Skip to content

Commit

Permalink
전체읽음 바로 반영되지 않는 오류 수정(2) (#661)
Browse files Browse the repository at this point in the history
fix: 알림 전체 읽음 즉시 반영
  • Loading branch information
guridaek authored Oct 11, 2023
1 parent 4cd8bbd commit 92d6435
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions frontend/src/layout/MyMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ const MyMenu = () => {
return !notification.isRead;
});

if (isNotRead.length !== 0) {
setIsAllRead(false);
}
setIsAllRead(isNotRead.length === 0);
};

const handleNotificationDropdown = () => {
Expand All @@ -56,11 +54,10 @@ const MyMenu = () => {
gapFromTrigger="52px"
isDropdownOpen={isNotificationDropdownOpen}
trigger={
isAllRead ? (
<S.NotificationIcon onClick={handleNotificationDropdown} src={NotificationOffIcon} />
) : (
<S.NotificationIcon onClick={handleNotificationDropdown} src={NotificationOnIcon} />
)
<S.NotificationIcon
onClick={handleNotificationDropdown}
src={isAllRead ? NotificationOffIcon : NotificationOnIcon}
/>
}
>
<Suspense>
Expand Down

0 comments on commit 92d6435

Please sign in to comment.