import { type FC, useEffect } from 'react' import Input from '@/components/Input' import { HambergerMenu, Wallet } from 'iconsax-react' // import AvatarImage from '@/assets/images/avatar_image.png' import { useLocation } from 'react-router-dom' import Notifications from '@/pages/notification/Notification' import { useSharedStore } from './store/useSharedStore' // import { useGetProfile } from '@/pages/profile/hooks/useProfileData' // import { Popover, PopoverButton, PopoverPanel } from '@headlessui/react' // import SidebarItem from './SidebarItem' // import { useGetWalletBalance } from '@/pages/wallet/hooks/useWalletData' // import { NumberFormat } from '../config/func' import { t } from '@/locale' const Header: FC = () => { const location = useLocation(); // const [popoverKey, setPopoverKey] = useState(0); const { setOpenSidebar, openSidebar } = useSharedStore() // const { data } = useGetProfile() // const getWalletBalance = useGetWalletBalance() useEffect(() => { // setPopoverKey((prevKey) => prevKey + 1); }, [location.pathname]); return (
setOpenSidebar(!openSidebar)} className='xl:hidden block'>
{/* */}
{/* */}
{/* {NumberFormat(getWalletBalance.data?.data?.balance) + ' ' + t('toman')} */} 20,132
{/* */} {/* { data && (
{data?.data?.user?.firstName + ' ' + data?.data?.user?.lastName}
setPopoverKey((prevKey) => prevKey + 1)} size={20} color='black' />
{data?.data?.user?.firstName + ' ' + data?.data?.user?.lastName}
{data?.data?.user?.email}
} title={t('header.wallet')} link={Pages.wallet} isActive isWithoutLine />
{t('home.balance')}
{NumberFormat(getWalletBalance.data?.data?.balance) + ' ' + t('toman')}
} title={t('sidebar.transactions')} isActive link={Pages.transactions} isWithoutLine /> } title={t('header.discounts')} isActive link={Pages.discounts} isWithoutLine /> } title={t('header.financial_info')} isActive link={Pages.financial} isWithoutLine /> } title={t('header.profile')} isActive link={Pages.profile} isWithoutLine /> } title={t('header.setting')} isActive link={Pages.setting} isWithoutLine />
} title={t('sidebar.logout')} isActive link={Pages.setting} isWithoutLine isLogout />
) } */}
) } export default Header