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 f9d78bd4..09128447 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 @@ -31,7 +31,7 @@ const NotificationListContent = () => { return ( <> - + { +type NotificationReadButtonProps = { + isRead: boolean + isEmpty: boolean +} + +const NotificationReadButton = ({ + isEmpty, + isRead, +}: NotificationReadButtonProps) => { const { mutate } = useNotificationListUpdateMutation() const handleReadAllNotifications = () => { @@ -9,12 +17,17 @@ const NotificationReadButton = () => { window.location.reload() } + if (isRead) { + return null + } + return (