import React, { useContext } from "react"; import { Link } 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"; import bank4 from "../../assets/images/bank-4.png"; import profileImg from "../../assets/images/profile-pic.jpg"; import useToggle from "../../hooks/useToggle"; import DarkModeContext from "../Contexts/DarkModeContext"; import Icons from "../Helpers/Icons"; import ModalCom from "../Helpers/ModalCom"; import SearchCom from "../Helpers/SearchCom"; export default function Header({ logoutModalHandler, sidebarHandler }) { const [balanceDropdown, setbalanceValue] = useToggle(false); const [notificationDropdown, setNotificationValue] = useToggle(false); const [userProfileDropdown, setProfileDropdown] = useToggle(false); const [moneyPopup, setPopup] = useToggle(false); const darkMode = useContext(DarkModeContext); const handlerBalance = () => { setbalanceValue.toggle(); if (notificationDropdown) { setNotificationValue.toggle(); } if (userProfileDropdown) { setProfileDropdown.toggle(); } }; const handlerNotification = () => { setNotificationValue.toggle(); if (balanceDropdown) { setbalanceValue.toggle(); } if (userProfileDropdown) { setProfileDropdown.toggle(); } }; const handlerProfile = () => { setProfileDropdown.toggle(); if (balanceDropdown) { setbalanceValue.toggle(); } if (notificationDropdown) { setNotificationValue.toggle(); } }; const clickAwayhandler = () => { if (balanceDropdown) { setbalanceValue.toggle(); } if (notificationDropdown) { setNotificationValue.toggle(); } if (userProfileDropdown) { setProfileDropdown.toggle(); } }; const addMoneyHandler = () => { setPopup.toggle(); setbalanceValue.set(false); }; return ( <>
{/* search bar */}
{/**/}
{/* user info */}
{/* dark mode */} {/* balance */}
handlerBalance()} className="flex items-center lg:justify-between justify-center w-full h-full" >

$ 234,435.34

Your Balance

  • MetaMask

    75,320 ETH

    (773.69 USD)

  • Coinbase Wallet

    56,124 ETH

    (773.69 USD)

  • Bitski

    99,123 ETH

    (773.69 USD)

  • WalletConnect

    43,728 ETH

    (773.69 USD)

$ 234,435.34

{/* notification */}
handlerNotification()} className="lg:w-[48px] lg:h-[48px] w-[38px] h-[38px] bg-white flex justify-center items-center rounded-full overflow-hidden relative" > 10

Recent Notifications

  • Your Account has been created successfully done

    23 house ago

  • You upload your frast product successfully done

    23 house ago

  • Thank you ! you made your frast sell 232.98 ETH

    23 house ago

  • Your Account has been created successfully done

    23 house ago

  • Your Account has been created successfully done

    23 house ago

See all Notification
10
{/* profile */}
handlerProfile()} className="flex items-center space-x-3.5" > {/* profile-image */}
profile

Brokln Simons

@broklinslam_75

My Profile

  • My Profile

  • Message

  • History

  • Setting

  • Log Out

profile
{balanceDropdown || notificationDropdown || userProfileDropdown ? (
) : ( "" )} {moneyPopup && (

Connect to a wallet

  • MetaMask

  • Coinbase Wallet

  • Bitski

  • WalletConnect

View Wallet
)} ); }