From 89c80e7f8f2535a483e064b5a77477603518aa4a Mon Sep 17 00:00:00 2001 From: doggopawer Date: Tue, 28 Nov 2023 00:01:04 +0900 Subject: [PATCH] =?UTF-8?q?:tada:=20=EC=95=8C=EB=A6=BC=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20,=20=EC=9D=BD=EC=9D=80=20=EC=B9=B4=EB=93=9C?= =?UTF-8?q?=EC=9D=98=20=EA=B2=BD=EC=9A=B0=20=EC=95=A1=ED=8B=B0=EB=B8=8C=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notification-card/NotificationCard.tsx | 19 +++++++++++-------- .../NotificationListContent.tsx | 1 + src/types/notification.ts | 6 ++++-- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/app/(root)/(routes)/notifications/components/notification-card/NotificationCard.tsx b/src/app/(root)/(routes)/notifications/components/notification-card/NotificationCard.tsx index 8f55dc6b..69913c23 100644 --- a/src/app/(root)/(routes)/notifications/components/notification-card/NotificationCard.tsx +++ b/src/app/(root)/(routes)/notifications/components/notification-card/NotificationCard.tsx @@ -9,8 +9,9 @@ type NotificationCardProps = { } const NotificationCard = ({ - notification: { content, cardId }, + notification: { content, cardId, read }, }: NotificationCardProps) => { + console.log('isRead', read) return ( @@ -28,13 +29,15 @@ const NotificationCard = ({
- + {read || ( + + )}
diff --git a/src/app/(root)/(routes)/notifications/components/notification-list-content/NotificationListContent.tsx b/src/app/(root)/(routes)/notifications/components/notification-list-content/NotificationListContent.tsx index 09128447..2f243c69 100644 --- a/src/app/(root)/(routes)/notifications/components/notification-list-content/NotificationListContent.tsx +++ b/src/app/(root)/(routes)/notifications/components/notification-list-content/NotificationListContent.tsx @@ -28,6 +28,7 @@ const NotificationListContent = () => { }, [entry?.isIntersecting, fetchNextPage, isFetchingNextPage]) const isEmpty = data?.pages[0].data.notificationList.length === 0 + console.log('listcontent', data) return ( <> diff --git a/src/types/notification.ts b/src/types/notification.ts index 602b6bb0..b6163d91 100644 --- a/src/types/notification.ts +++ b/src/types/notification.ts @@ -1,6 +1,8 @@ export interface Notification { + cardId: number notificationId: number - isRead: boolean + read: boolean + createdAt: string + modifiedAt: string content: string - cardId: number }