spam list + socket events
This commit is contained in:
+12
-3
@@ -2,9 +2,9 @@ import { FC, useEffect, useState } from 'react'
|
||||
import Input from '../components/Input'
|
||||
import { Element3, HambergerMenu, Wallet } from 'iconsax-react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Link, useLocation } from 'react-router-dom'
|
||||
import { Link, useLocation, useNavigate } from 'react-router-dom'
|
||||
import { Paths } from '@/utils/Paths'
|
||||
// import Notifications from '../pages/notification/Notification'
|
||||
import { EmailNotifications } from '@/components/EmailNotifications'
|
||||
import { useSharedStore } from './store/sharedStore'
|
||||
// import { useGetProfile } from '../pages/profile/hooks/useProfileData'
|
||||
// import { Popover, PopoverButton, PopoverPanel } from '@headlessui/react'
|
||||
@@ -14,12 +14,16 @@ import { useSharedStore } from './store/sharedStore'
|
||||
const Header: FC = () => {
|
||||
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
const [popoverKey, setPopoverKey] = useState(0);
|
||||
const { t } = useTranslation('global')
|
||||
const { setOpenSidebar, openSidebar } = useSharedStore()
|
||||
// const { data } = useGetProfile()
|
||||
// const getWalletBalance = useGetWalletBalance()
|
||||
|
||||
// فرض میکنیم که token از localStorage گرفته میشود
|
||||
const userToken = localStorage.getItem('jwt-token') || '';
|
||||
|
||||
console.log(popoverKey);
|
||||
useEffect(() => {
|
||||
|
||||
@@ -57,7 +61,12 @@ const Header: FC = () => {
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
{/* <Notifications /> */}
|
||||
{userToken && (
|
||||
<EmailNotifications
|
||||
userToken={userToken}
|
||||
onEmailClick={(email) => navigate(`/mail/${email.messageId}`)}
|
||||
/>
|
||||
)}
|
||||
{/* {
|
||||
data && (
|
||||
<Popover className="relative" key={popoverKey}>
|
||||
|
||||
Reference in New Issue
Block a user