From 31297efb5be476fabc68a22aa561dd649062169f Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Sun, 23 Jul 2023 07:15:25 +0100 Subject: [PATCH 1/2] closes notification menu when see all notifications is clicked --- src/components/Partials/Header.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/Partials/Header.jsx b/src/components/Partials/Header.jsx index 59f749e..c063bda 100644 --- a/src/components/Partials/Header.jsx +++ b/src/components/Partials/Header.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useMemo, useState } from "react"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation, useNavigate } from "react-router-dom"; import bank1 from "../../assets/images/bank-1.png"; import bank2 from "../../assets/images/bank-2.png"; import bank3 from "../../assets/images/bank-3.png"; @@ -29,6 +29,7 @@ export default function Header({ logoutModalHandler, sidebarHandler }) { const [myWalletList, setMyWalletList] = useState([]); const api = useMemo(() => new usersService(), []); const dispatch = useDispatch(); + const navigate = useNavigate() const { notifications } = useSelector((state) => state?.notifications); // NOTIFICATION STORE @@ -314,12 +315,16 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
- See all Notification - + */} +
From 187ac61396f6727d548f871f63bd16f59b0f5a5b Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Sun, 23 Jul 2023 07:18:56 +0100 Subject: [PATCH 2/2] logged information removed --- src/components/Notification/index.jsx | 1 - src/components/Partials/Header.jsx | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Notification/index.jsx b/src/components/Notification/index.jsx index 919ce48..e478d11 100644 --- a/src/components/Notification/index.jsx +++ b/src/components/Notification/index.jsx @@ -35,7 +35,6 @@ export default function Notification() { const indexOfLastItem = Number(indexOfFirstItem) + Number(process.env.REACT_APP_ITEM_PER_PAGE); const currentNotifications = notificationData?.slice(indexOfFirstItem, indexOfLastItem); - console.log('TESTING', currentNotifications) const filterHandler = (value) => { setValue(value); switch(value){ diff --git a/src/components/Partials/Header.jsx b/src/components/Partials/Header.jsx index c063bda..cbb8156 100644 --- a/src/components/Partials/Header.jsx +++ b/src/components/Partials/Header.jsx @@ -315,16 +315,17 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
- {/* See all Notification - */} - + }}>See all Notification */}