This commit is contained in:
hamid zarghami
2025-01-26 09:07:21 +03:30
parent c349d1ce55
commit 49e09fa9ab
9 changed files with 268 additions and 28 deletions
+17 -10
View File
@@ -7,11 +7,13 @@ import { Link } from 'react-router-dom'
import { Pages } from '../config/Pages'
import Notifications from '../pages/notification/Notification'
import { useSharedStore } from './store/sharedStore'
import { useGetProfile } from '../pages/profile/hooks/useProfileData'
const Header: FC = () => {
const { t } = useTranslation('global')
const { setOpenSidebar, openSidebar } = useSharedStore()
const { data } = useGetProfile()
return (
<div className='fixed z-10 right-4 left-4 xl:right-[285px] top-4 xl:h-16 h-12 flex items-center px-6 bg-white justify-between rounded-[32px] xl:w-[calc(100%-305px)]'>
@@ -32,17 +34,22 @@ const Header: FC = () => {
<Wallet className='xl:size-[18px] size-[17px]' color='black' />
</Link>
<Notifications />
<div className='flex gap-2 items-center'>
<div className='size-6 rounded-full bg-description overflow-hidden'>
<Link to={Pages.profile}>
<img src={AvatarImage} className='size-full object-cover' />
</Link>
{
data &&
<div className='flex gap-2 items-center'>
<div className='size-6 rounded-full bg-description overflow-hidden'>
<Link to={Pages.profile}>
<img src={AvatarImage} className='size-full object-cover' />
</Link>
</div>
<div className='xl:flex hidden gap-1 items-center'>
<div className='text-xs'>
{data?.data?.user?.firstName + ' ' + data?.data?.user?.lastName}
</div>
<ArrowDown2 size={14} color='#8C90A3' />
</div>
</div>
<div className='xl:flex hidden gap-1 items-center'>
<div className='text-xs'>مهرداد مظفری</div>
<ArrowDown2 size={14} color='#8C90A3' />
</div>
</div>
}
</div>
</div>
)