diff --git a/src/config/Pages.ts b/src/config/Pages.ts index fd96843..505c980 100644 --- a/src/config/Pages.ts +++ b/src/config/Pages.ts @@ -29,4 +29,6 @@ export const Pages = { setting: "/setting", wallet: "/wallet", profile: "/profile", + discounts: "/discounts", + financial: "/financial", }; diff --git a/src/index.css b/src/index.css index e71247d..21c97d6 100644 --- a/src/index.css +++ b/src/index.css @@ -12,7 +12,7 @@ body { padding: 0; width: 100%; direction: rtl; - overflow-x: hidden !important; + overflow: hidden !important; background: #eceef6; font-weight: 300; overflow: hidden; diff --git a/src/langs/fa.json b/src/langs/fa.json index 90f23b0..4fbbf3d 100644 --- a/src/langs/fa.json +++ b/src/langs/fa.json @@ -62,7 +62,12 @@ "logout": "خروج" }, "header": { - "search": "جستجو" + "search": "جستجو", + "wallet": "کیف پول", + "discounts": "کدهای تخفیف", + "financial_info": "مشخصات مالی", + "profile": "پروفایل", + "setting": "تنظیمات" }, "home": { "new": "جدید", diff --git a/src/shared/Header.tsx b/src/shared/Header.tsx index a6cc720..63e6664 100644 --- a/src/shared/Header.tsx +++ b/src/shared/Header.tsx @@ -1,20 +1,28 @@ -import { FC } from 'react' +import { FC, useEffect, useState } from 'react' import Input from '../components/Input' -import { ArrowDown2, Element3, HambergerMenu, Wallet } from 'iconsax-react' +import { ArrowDown2, Card, CloseCircle, Element3, HambergerMenu, Logout, ProfileCircle, Receipt1, Setting2, TicketDiscount, Wallet } from 'iconsax-react' import AvatarImage from '../assets/images/Avatar.png' import { useTranslation } from 'react-i18next' -import { Link } from 'react-router-dom' +import { Link, useLocation } 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' +import { Popover, PopoverButton, PopoverPanel } from '@headlessui/react' +import SideBarItem from './SideBarItem' const Header: FC = () => { + const location = useLocation(); + const [popoverKey, setPopoverKey] = useState(0); const { t } = useTranslation('global') const { setOpenSidebar, openSidebar } = useSharedStore() const { data } = useGetProfile() + useEffect(() => { + setPopoverKey((prevKey) => prevKey + 1); + }, [location.pathname]); + return (