Skip to content

Commit 0660dac

Browse files
committed
fix: Header -읽지 않은 알림이 0개일 때 unReadCount가 표시되지 않도록 수정
1 parent cbce84d commit 0660dac

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/components/layout/header/index.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ export const Header = () => {
2323
receivedNewNotification && 'animate-ring text-mint-500',
2424
)}
2525
/>
26-
<span
27-
className={cn(
28-
'bg-mint-300 absolute top-1 right-1.75 aspect-square size-3.5 rounded-full',
29-
receivedNewNotification && 'animate-ping',
30-
)}
31-
/>
32-
<span className='bg-mint-500 text-mono-white text-text-2xs-semibold flex-center absolute top-1 right-1.75 aspect-square size-3.5 rounded-full'>
33-
{unReadCount}
34-
</span>
26+
{unReadCount > 0 && (
27+
<>
28+
<span
29+
className={cn(
30+
'bg-mint-300 absolute top-1 right-1.75 aspect-square size-3.5 rounded-full',
31+
receivedNewNotification && 'animate-ping',
32+
)}
33+
/>
34+
<span className='bg-mint-500 text-mono-white text-text-2xs-semibold flex-center absolute top-1 right-1.75 aspect-square size-3.5 rounded-full'>
35+
{unReadCount}
36+
</span>
37+
</>
38+
)}
3539
</Link>
3640
</div>
3741
</nav>

0 commit comments

Comments
 (0)