Skip to content

Commit

Permalink
🎉 알림 카드 , 읽은 카드의 경우 액티브 표시 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
doggopawer committed Nov 27, 2023
1 parent 63a59ad commit 383d21a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type NotificationCardProps = {
}

const NotificationCard = ({
notification: { content, cardId },
notification: { content, cardId, read },
}: NotificationCardProps) => {
return (
<Link href={`${AppPath.mySuggestions(cardId)}`}>
Expand All @@ -28,13 +28,15 @@ const NotificationCard = ({
</CardFlex>
<CardFlex className="w-12" justify={'center'}>
<div className="w-2.5 h-2.5 relative">
<CardImage
alt={'점 아이콘'}
src={Assets.notificationDot}
layout="fill"
objectFit="cover"
className="rounded"
/>
{read || (
<CardImage
alt={'점 아이콘'}
src={Assets.notificationDot}
layout="fill"
objectFit="cover"
className="rounded"
/>
)}
</div>
</CardFlex>
</CardFlex>
Expand Down
6 changes: 4 additions & 2 deletions src/types/notification.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export interface Notification {
cardId: number
notificationId: number
isRead: boolean
read: boolean
createdAt: string
modifiedAt: string
content: string
cardId: number
}

0 comments on commit 383d21a

Please sign in to comment.