From e49aa35b15be7edafe84919168781b542e14c782 Mon Sep 17 00:00:00 2001 From: priyanshuvish Date: Thu, 10 Oct 2024 13:51:45 +0530 Subject: [PATCH] reports done --- src/Pages/Notification/Notification.jsx | 8 +++++++- src/Routes/Nav.js | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Pages/Notification/Notification.jsx b/src/Pages/Notification/Notification.jsx index d723301..7dc6d5c 100644 --- a/src/Pages/Notification/Notification.jsx +++ b/src/Pages/Notification/Notification.jsx @@ -57,6 +57,11 @@ const Notification = () => { setNotifications(notifications.filter(notification => notification.id !== id)); }; + // Handler to delete all notifications + const handleDeleteAll = () => { + setNotifications([]); + }; + return ( @@ -86,9 +91,10 @@ const Notification = () => { py={1} rounded={"md"} color={"#EE1B24"} + onClick={handleDeleteAll} > - Mark as read + Delete All diff --git a/src/Routes/Nav.js b/src/Routes/Nav.js index f99e689..1a1e7a1 100644 --- a/src/Routes/Nav.js +++ b/src/Routes/Nav.js @@ -141,13 +141,13 @@ export const nav = [ { title: "Notification", type: "single", - path: "/home", + path: "/notification", Icon: TbAlignBoxBottomCenter, }, { title: "Settings", type: "single", - path: "/home", + path: "/setting", Icon: IoSettingsOutline, }, // {