From a3f1e8824752541cab718d8ffe4e00bf36df9635 Mon Sep 17 00:00:00 2001 From: SeanM322 Date: Thu, 10 Oct 2024 14:38:33 +0300 Subject: [PATCH] disable "Clear All" btn If totalCount === 0 --- .../MenuComponents/MobileNavigationList.tsx | 31 ++++++++++--------- .../PopUpNotification/PopUpNotification.tsx | 23 ++++++++------ 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/rair-front/src/components/Navigation/MenuComponents/MobileNavigationList.tsx b/rair-front/src/components/Navigation/MenuComponents/MobileNavigationList.tsx index 49ff058b..1f7a3a2b 100644 --- a/rair-front/src/components/Navigation/MenuComponents/MobileNavigationList.tsx +++ b/rair-front/src/components/Navigation/MenuComponents/MobileNavigationList.tsx @@ -90,7 +90,9 @@ const MobileNavigationList: React.FC = ({ const [copyEth, setCopyEth] = useState(false); const [flagLoading, setFlagLoading] = useState(false); - const {notifications, totalCount} = useAppSelector(store => store.notifications); + const { notifications, totalCount } = useAppSelector( + (store) => store.notifications + ); const [currentPageNotification, setCurrentPageNotification] = useState(1); const reactSwal = useSwal(); @@ -124,7 +126,7 @@ const MobileNavigationList: React.FC = ({ }, [currentUserAddress, dispatch, reactSwal]); useEffect(() => { - if(currentUserAddress && isLoggedIn) { + if (currentUserAddress && isLoggedIn) { dispatch(fetchNotifications(0)); } }, [currentUserAddress, isLoggedIn]); @@ -164,19 +166,22 @@ const MobileNavigationList: React.FC = ({