Merge branch 'notification-menu-close' of WrenchBoard/Users-Wrench into master

This commit is contained in:
2023-07-23 10:20:40 +00:00
committed by Gogs
2 changed files with 7 additions and 2 deletions
-1
View File
@@ -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){
+7 -1
View File
@@ -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
@@ -317,9 +318,14 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
<Link
to="/notification"
className="text-purple text-sm font-medium"
onClick={handlerNotification}
>
See all Notification
</Link>
{/* <button className="text-purple text-sm font-medium" onClick={()=>{
handlerNotification()
navigate('/notification', {replace: true})
}}>See all Notification</button> */}
</div>
</div>
</div>