diff --git a/index.html b/index.html index e4b78ea..43683bd 100644 --- a/index.html +++ b/index.html @@ -1,13 +1,16 @@ - - - - - Vite + React + TS - - -
- - - + + + + + + پنل مدیریت | فجر مرکزی + + + +
+ + + + \ No newline at end of file diff --git a/public/vite.svg b/public/vite.svg index e7b8dfb..0688442 100644 --- a/public/vite.svg +++ b/public/vite.svg @@ -1 +1,37 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/images/logo-small.svg b/src/assets/images/logo-small.svg index af5e4f3..0688442 100644 --- a/src/assets/images/logo-small.svg +++ b/src/assets/images/logo-small.svg @@ -1,13 +1,37 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/images/logo.svg b/src/assets/images/logo.svg index 200db25..aeace2c 100644 --- a/src/assets/images/logo.svg +++ b/src/assets/images/logo.svg @@ -1,91 +1,1064 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + width="100%" viewBox="0 0 1948 615" enable-background="new 0 0 1948 615" xml:space="preserve"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/Radio.tsx b/src/components/Radio.tsx index 790595e..7934efa 100644 --- a/src/components/Radio.tsx +++ b/src/components/Radio.tsx @@ -11,7 +11,7 @@ const Radio: FC = (props: Props) => {
props.onChange(props.value)} className='size-4 cursor-pointer rounded-full bg-[#EAEDF5] flex justify-center items-center'> { props.isActive && -
+
}
) diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx index 01595b5..bc8a40e 100644 --- a/src/components/Tabs.tsx +++ b/src/components/Tabs.tsx @@ -33,7 +33,7 @@ const Tabs: FC = (props: Props) => { 'flex flex-col max-w-fit mt-[15px] items-center gap-2 cursor-pointer', index === 0 && 'pr-[30px]', index === props.items.length - 1 && 'pl-[30px]', - props.active === item.value && 'text-black' + props.active === item.value && 'text-primary' )}> {item.icon}
diff --git a/src/index.css b/src/index.css index c3b371f..618f1a9 100644 --- a/src/index.css +++ b/src/index.css @@ -33,7 +33,7 @@ textarea::placeholder { } @theme { - --color-primary: black; + --color-primary: #da2129; --color-secondary: #f4f5f9; --color-border: #d0d0d0; --color-description: #888888; @@ -75,7 +75,6 @@ textarea::placeholder { --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); - --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); @@ -84,7 +83,6 @@ textarea::placeholder { --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); - --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --color-chart-1: var(--chart-1); diff --git a/src/pages/Coupon/hooks/useCouponData.ts b/src/pages/Coupon/hooks/useCouponData.ts index 27a505c..3f9f4d3 100644 --- a/src/pages/Coupon/hooks/useCouponData.ts +++ b/src/pages/Coupon/hooks/useCouponData.ts @@ -1,11 +1,12 @@ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"; import * as api from "../service/CouponService"; import type { CreateCouponType } from "../types/Types"; - +import { useSharedStore } from "@/shared/store/sharedStore"; export const useGetCoupons = (page: number = 1) => { + const { search } = useSharedStore(); return useQuery({ - queryKey: ["coupons", page], - queryFn: () => api.getCoupons(page), + queryKey: ["coupons", page, search], + queryFn: () => api.getCoupons(page, search), }); }; diff --git a/src/pages/Coupon/service/CouponService.ts b/src/pages/Coupon/service/CouponService.ts index 7d44057..378e717 100644 --- a/src/pages/Coupon/service/CouponService.ts +++ b/src/pages/Coupon/service/CouponService.ts @@ -7,9 +7,12 @@ import type { } from "../types/Types"; export const getCoupons = async ( - page: number = 1 + page: number = 1, + search: string ): Promise => { - const { data } = await axios.get(`/admin/coupon/native?page=${page}`); + const { data } = await axios.get( + `/admin/coupon/native?page=${page}&q=${search}` + ); return data; }; diff --git a/src/pages/blogs/hooks/useBlogsData.ts b/src/pages/blogs/hooks/useBlogsData.ts index 0c5fb74..dc01283 100644 --- a/src/pages/blogs/hooks/useBlogsData.ts +++ b/src/pages/blogs/hooks/useBlogsData.ts @@ -7,11 +7,12 @@ import type { UpdateBlogType, BlogCategoriesResponse, } from "../types/Types"; - +import { useSharedStore } from "@/shared/store/sharedStore"; export const useGetBlogs = (page: number = 1) => { + const { search } = useSharedStore(); return useQuery({ - queryKey: ["blogs", page], - queryFn: () => api.getBlogs(page), + queryKey: ["blogs", page, search], + queryFn: () => api.getBlogs(page, search), }); }; diff --git a/src/pages/blogs/service/BlogsService.ts b/src/pages/blogs/service/BlogsService.ts index 772ad9e..dae6080 100644 --- a/src/pages/blogs/service/BlogsService.ts +++ b/src/pages/blogs/service/BlogsService.ts @@ -9,8 +9,13 @@ import type { BlogDetailResponse, } from "../types/Types"; -export const getBlogs = async (page: number = 1): Promise => { - const { data } = await axios.get(`/blogs?page=${page}`); +export const getBlogs = async ( + page: number = 1, + search: string +): Promise => { + const { data } = await axios.get( + `/blogs?page=${page}&q=${search}` + ); return data.results; }; diff --git a/src/pages/brand/hooks/useBrandData.ts b/src/pages/brand/hooks/useBrandData.ts index 2e6a729..43da7d6 100644 --- a/src/pages/brand/hooks/useBrandData.ts +++ b/src/pages/brand/hooks/useBrandData.ts @@ -1,10 +1,12 @@ import { useMutation, useQuery } from "@tanstack/react-query"; import * as api from "../service/BrandService"; +import { useSharedStore } from "@/shared/store/sharedStore"; export const useGetBrands = (page: number = 1, limit: number = 10) => { + const { search } = useSharedStore(); return useQuery({ - queryKey: ["brands", page, limit], - queryFn: () => api.getBrands(page, limit), + queryKey: ["brands", page, limit, search], + queryFn: () => api.getBrands(page, limit, search), }); }; diff --git a/src/pages/brand/service/BrandService.ts b/src/pages/brand/service/BrandService.ts index 65d6bdb..169ab28 100644 --- a/src/pages/brand/service/BrandService.ts +++ b/src/pages/brand/service/BrandService.ts @@ -2,9 +2,9 @@ import axios from "../../../config/axios"; import { type BrandsResponseType, type CreateBrandType } from "../types/Types"; import { type IBrandResponse } from "../../../types/response.types"; -export const getBrands = async (page: number = 1, limit: number = 10): Promise => { +export const getBrands = async (page: number = 1, limit: number = 10, search: string): Promise => { const { data } = await axios.get(`/brand`, { - params: { page, limit } + params: { page, limit, q: search } }); return data; }; diff --git a/src/pages/category/hooks/useCategoryData.tsx b/src/pages/category/hooks/useCategoryData.tsx index 542453a..b4d8726 100644 --- a/src/pages/category/hooks/useCategoryData.tsx +++ b/src/pages/category/hooks/useCategoryData.tsx @@ -1,6 +1,7 @@ import { useMutation, useQuery } from '@tanstack/react-query'; import * as api from '../service/CategoryService'; import { type CategoryType, type CreateCategoryAttributeType, type CategoryAttributesResponseType } from '../types/Types'; +import { useSharedStore } from '@/shared/store/sharedStore'; export const useCreateCategory = () => { return useMutation({ @@ -9,9 +10,10 @@ export const useCreateCategory = () => { }; export const useGetCategories = () => { + const { search } = useSharedStore(); return useQuery({ - queryKey: ['categories'], - queryFn: api.getCategories, + queryKey: ['categories', search], + queryFn: () => api.getCategories(search), }); }; diff --git a/src/pages/category/service/CategoryService.ts b/src/pages/category/service/CategoryService.ts index 7021a03..1117cd9 100644 --- a/src/pages/category/service/CategoryService.ts +++ b/src/pages/category/service/CategoryService.ts @@ -6,8 +6,8 @@ export const createCategory = async (params: CategoryType) => { return data; }; -export const getCategories = async (): Promise => { - const { data } = await axios.get(`/category`); +export const getCategories = async (search: string): Promise => { + const { data } = await axios.get(`/category?q=${search}`); return data; }; diff --git a/src/pages/orders/hooks/useOrderData.ts b/src/pages/orders/hooks/useOrderData.ts index eeb0935..13c401f 100644 --- a/src/pages/orders/hooks/useOrderData.ts +++ b/src/pages/orders/hooks/useOrderData.ts @@ -1,13 +1,15 @@ import { useMutation, useQuery } from "@tanstack/react-query"; import * as api from "../service/OrderService"; +import { useSharedStore } from "@/shared/store/sharedStore"; export const useGetNativeOrders = ( page: number = 1, status: string = "all" ) => { + const { search } = useSharedStore(); const { data, isLoading, error } = useQuery({ - queryKey: ["orders", page, status], - queryFn: () => api.getNativeOrders(page, status), + queryKey: ["orders", page, status, search], + queryFn: () => api.getNativeOrders(page, status, search), }); return { data, isLoading, error }; }; @@ -16,9 +18,10 @@ export const useGetSellerOrders = ( page: number = 1, status: string = "all" ) => { + const { search } = useSharedStore(); const { data, isLoading, error } = useQuery({ - queryKey: ["orders", page, status], - queryFn: () => api.getSellerOrders(page, status), + queryKey: ["orders", page, status, search], + queryFn: () => api.getSellerOrders(page, status, search), }); return { data, isLoading, error }; }; diff --git a/src/pages/orders/service/OrderService.ts b/src/pages/orders/service/OrderService.ts index 52cd653..01c55ba 100644 --- a/src/pages/orders/service/OrderService.ts +++ b/src/pages/orders/service/OrderService.ts @@ -10,20 +10,22 @@ import type { export const getNativeOrders = async ( page: number = 1, - status: string + status: string, + search: string ): Promise => { const { data } = await axios.get("/admin/orders/native", { - params: { page, status }, + params: { page, status, q: search }, }); return data; }; export const getSellerOrders = async ( page: number = 1, - status: string + status: string, + search: string ): Promise => { const { data } = await axios.get("/admin/orders/seller", { - params: { page, status }, + params: { page, status, q: search }, }); return data; }; diff --git a/src/pages/products/List.tsx b/src/pages/products/List.tsx index 6159e9c..f65b83e 100644 --- a/src/pages/products/List.tsx +++ b/src/pages/products/List.tsx @@ -89,7 +89,7 @@ const List: FC = () => { {products.length === 0 ? ( - + هیچ محصولی یافت نشد diff --git a/src/pages/products/hooks/useProductData.ts b/src/pages/products/hooks/useProductData.ts index 6cc945e..72e6fe8 100644 --- a/src/pages/products/hooks/useProductData.ts +++ b/src/pages/products/hooks/useProductData.ts @@ -9,6 +9,7 @@ import { type UpdateProductAttributeRequestType, type UpdateProductRequestType } from "../types/Types"; +import { useSharedStore } from '@/shared/store/sharedStore'; export const useCreateProductDetail = () => { return useMutation({ @@ -29,9 +30,10 @@ export const useSaveProduct = () => { }; export const useGetProducts = (page: number = 1, limit: number = 10) => { + const { search } = useSharedStore(); return useQuery({ - queryKey: ['products', page, limit], - queryFn: () => api.getProducts(page, limit), + queryKey: ['products', page, limit, search], + queryFn: () => api.getProducts(page, limit, search), }); }; diff --git a/src/pages/seller/List.tsx b/src/pages/seller/List.tsx index 703e2b8..d0a5317 100644 --- a/src/pages/seller/List.tsx +++ b/src/pages/seller/List.tsx @@ -62,7 +62,7 @@ const SellerList: FC = () => { {sellers.length === 0 ? ( - + هیچ فروشنده‌ای یافت نشد diff --git a/src/pages/seller/hooks/useSellerData.ts b/src/pages/seller/hooks/useSellerData.ts index f9f6ddd..459dae4 100644 --- a/src/pages/seller/hooks/useSellerData.ts +++ b/src/pages/seller/hooks/useSellerData.ts @@ -5,11 +5,13 @@ import type { CreateCategoryLearning, CreateLearningType, } from "../types/Types"; +import { useSharedStore } from "@/shared/store/sharedStore"; export const useGetSellers = (page: number = 1, enabled: boolean = true) => { + const { search } = useSharedStore(); return useQuery({ - queryKey: ["sellers", page], - queryFn: () => api.getSellers(page), + queryKey: ["sellers", page, search], + queryFn: () => api.getSellers(page, search), enabled, }); }; diff --git a/src/pages/seller/service/SellerService.ts b/src/pages/seller/service/SellerService.ts index c8ce53b..6b7f021 100644 --- a/src/pages/seller/service/SellerService.ts +++ b/src/pages/seller/service/SellerService.ts @@ -16,9 +16,10 @@ import type { } from "../types/Types"; export const getSellers = async ( - page: number = 1 + page: number = 1, + search: string ): Promise => { - const { data } = await axios.get(`/admin/sellers?page=${page}`); + const { data } = await axios.get(`/admin/sellers?page=${page}&q=${search}`); return data; }; diff --git a/src/pages/user/hooks/useUserData.ts b/src/pages/user/hooks/useUserData.ts index 44ae957..76ac3fe 100644 --- a/src/pages/user/hooks/useUserData.ts +++ b/src/pages/user/hooks/useUserData.ts @@ -1,9 +1,11 @@ import { useQuery } from "@tanstack/react-query"; import * as api from "../service/UserService"; +import { useSharedStore } from "@/shared/store/sharedStore"; export const useGetUsers = (page: number = 1, limit: number = 10) => { + const { search } = useSharedStore(); return useQuery({ - queryKey: ["users", page, limit], - queryFn: () => api.getUsers(page, limit), + queryKey: ["users", page, limit, search], + queryFn: () => api.getUsers(page, limit, search), }); }; diff --git a/src/pages/user/service/UserService.ts b/src/pages/user/service/UserService.ts index 75f7279..2b2bb4c 100644 --- a/src/pages/user/service/UserService.ts +++ b/src/pages/user/service/UserService.ts @@ -4,10 +4,11 @@ import type { UserResponse } from "../types/Types"; export const getUsers = async ( page: number = 1, - limit: number = 10 + limit: number = 10, + search: string ): Promise => { const { data } = await axios.get("/admin/users", { - params: { page, limit }, + params: { page, limit, q: search }, }); return data; }; diff --git a/src/shared/Header.tsx b/src/shared/Header.tsx index f6430e8..5d6fa98 100644 --- a/src/shared/Header.tsx +++ b/src/shared/Header.tsx @@ -1,9 +1,9 @@ -import { type FC } from 'react' +import { type FC, useEffect } from 'react' import Input from '../components/Input' // import { ArrowDown2, CloseCircle, HambergerMenu, Logout, Wallet } from 'iconsax-react' // import AvatarImage from '../assets/images/avatar_image.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 { useSharedStore } from './store/sharedStore' import { HambergerMenu, Wallet } from 'iconsax-react' @@ -13,7 +13,8 @@ const Header: FC = () => { // const location = useLocation(); // const [popoverKey, setPopoverKey] = useState(0); const { t } = useTranslation('global') - const { setOpenSidebar, openSidebar, hasSubMenu } = useSharedStore() + const { setOpenSidebar, openSidebar, hasSubMenu, setSearch } = useSharedStore() + const location = useLocation() // useEffect(() => { // setPopoverKey((prevKey) => prevKey + 1); @@ -25,6 +26,10 @@ const Header: FC = () => { // window.location.href = Pages.auth.login // } + useEffect(() => { + setSearch('') + }, [location.pathname]) + return (
@@ -32,15 +37,16 @@ const Header: FC = () => { setSearch(value)} />
setOpenSidebar(!openSidebar)} className='xl:hidden block'> - +
{/* */}
- + {/* */} {/* { @@ -62,7 +68,7 @@ const Header: FC = () => {
- setPopoverKey((prevKey) => prevKey + 1)} size={20} color='black' /> + setPopoverKey((prevKey) => prevKey + 1)} size={20} color='#da2129' />
@@ -80,7 +86,7 @@ const Header: FC = () => {
handleLogout()} className='flex gap-2 items-center cursor-pointer'> - +
{t('sidebar.logout')}
diff --git a/src/shared/SideBar.tsx b/src/shared/SideBar.tsx index 9aef61d..6b0aee4 100644 --- a/src/shared/SideBar.tsx +++ b/src/shared/SideBar.tsx @@ -106,7 +106,7 @@ const SideBar: FC = () => {
{/* داشبورد */} } + icon={} title="داشبورد" isActive={isActive('dashboard')} link="/dashboard" @@ -115,7 +115,7 @@ const SideBar: FC = () => { {/* محصولات */} } + icon={} title="محصولات" isActive={isActive('products')} link={Pages.products.list} @@ -124,7 +124,7 @@ const SideBar: FC = () => { {/* سفارشات */} } + icon={} title="سفارشات" isActive={isActive('orders')} link="/orders" @@ -133,7 +133,7 @@ const SideBar: FC = () => { {/* تخفیف ها */} } + icon={} title="تخفیف ها" isActive={isActive('coupon')} link={Pages.coupon.list} @@ -142,7 +142,7 @@ const SideBar: FC = () => { {/* بلاگ */} } + icon={} title="بلاگ" isActive={isActive('blog')} link="/blog" @@ -151,7 +151,7 @@ const SideBar: FC = () => { {/* روش های ارسال */} } + icon={} title="روش های ارسال" isActive={isActive('shipment')} link={Pages.shipment.list} @@ -160,7 +160,7 @@ const SideBar: FC = () => { {/* مالی */} } + icon={} title="مالی" isActive={isActive('financial')} link={Pages.financial.list} @@ -169,7 +169,7 @@ const SideBar: FC = () => { {/* فروشندگان */} } + icon={} title="فروشندگان" isActive={isActive('sellers')} link={Pages.sellers.list} @@ -178,7 +178,7 @@ const SideBar: FC = () => { {/* خریداران */} } + icon={} title="خریداران" isActive={isActive('buy-users')} link={Pages.buyUsers.list} @@ -187,7 +187,7 @@ const SideBar: FC = () => { {/* کاربران */} } + icon={} title="ادمین ها" isActive={isActive('admin')} link={Pages.admin.list} @@ -196,7 +196,7 @@ const SideBar: FC = () => { {/* تیکت ها */} } + icon={} title="تیکت ها" isActive={isActive('tickets')} link={Pages.ticket.list} @@ -205,7 +205,7 @@ const SideBar: FC = () => { {/* گزارش ها */} } + icon={} title="گزارش ها" isActive={isActive('reports')} link={Pages.report.product} @@ -214,7 +214,7 @@ const SideBar: FC = () => { {/* گفت و گو */} } + icon={} title="گفت و گو" isActive={isActive('chat')} link={Pages.messages.list} @@ -223,7 +223,7 @@ const SideBar: FC = () => { {/* ارتباط با ما */} } + icon={} title="ارتباط با ما" isActive={isActive('contact')} link={Pages.contactUs.list} @@ -232,7 +232,7 @@ const SideBar: FC = () => { {/* تنظیمات */} } + icon={} title="تنظیمات" isActive={isActive('settings')} link="/settings" @@ -241,7 +241,7 @@ const SideBar: FC = () => { {/* مدیریت صفحات */} } + icon={} title="مدیریت صفحات" isActive={isActive('pages')} link={Pages.pages.aboutUs} @@ -250,7 +250,7 @@ const SideBar: FC = () => { {/* مشاغل */} } + icon={} title="مشاغل" isActive={isActive('jobs')} link={Pages.jobs.list} @@ -261,7 +261,7 @@ const SideBar: FC = () => {
} + icon={} title="خروج" isActive={isActive('logout')} link={`#`} diff --git a/src/shared/SideBarItem.tsx b/src/shared/SideBarItem.tsx index c547576..28bc55e 100644 --- a/src/shared/SideBarItem.tsx +++ b/src/shared/SideBarItem.tsx @@ -40,7 +40,7 @@ const SideBarItem: FC = (props: Props) => { hasSubMenu && 'flex-col', )}>
@@ -49,7 +49,7 @@ const SideBarItem: FC = (props: Props) => { hasSubMenu && 'flex-col text-[10px]', )}> {props.icon} -
+
{props.title}
diff --git a/src/shared/components/BlogSubMenu.tsx b/src/shared/components/BlogSubMenu.tsx index 2d0ac3e..f1d3fcb 100644 --- a/src/shared/components/BlogSubMenu.tsx +++ b/src/shared/components/BlogSubMenu.tsx @@ -17,7 +17,7 @@ const BlogSubMenu: FC = () => {
diff --git a/src/shared/components/BuyersSubMenu.tsx b/src/shared/components/BuyersSubMenu.tsx index 9101148..8498023 100644 --- a/src/shared/components/BuyersSubMenu.tsx +++ b/src/shared/components/BuyersSubMenu.tsx @@ -15,7 +15,7 @@ const BuyersSubMenu: FC = () => {
diff --git a/src/shared/components/CategorySubMenu.tsx b/src/shared/components/CategorySubMenu.tsx index 82ca3fb..2458bbf 100644 --- a/src/shared/components/CategorySubMenu.tsx +++ b/src/shared/components/CategorySubMenu.tsx @@ -15,7 +15,7 @@ const CategorySubMenu: FC = () => {
diff --git a/src/shared/components/ChatSubMenu.tsx b/src/shared/components/ChatSubMenu.tsx index 13e53f6..5234e6e 100644 --- a/src/shared/components/ChatSubMenu.tsx +++ b/src/shared/components/ChatSubMenu.tsx @@ -14,7 +14,7 @@ const ChatSubMenu: FC = () => {
diff --git a/src/shared/components/ContactSubMenu.tsx b/src/shared/components/ContactSubMenu.tsx index c58dfa3..f0aa7ce 100644 --- a/src/shared/components/ContactSubMenu.tsx +++ b/src/shared/components/ContactSubMenu.tsx @@ -15,7 +15,7 @@ const ContactSubMenu: FC = () => {
diff --git a/src/shared/components/CustomerSubMenu.tsx b/src/shared/components/CustomerSubMenu.tsx index 5e4717e..14ce855 100644 --- a/src/shared/components/CustomerSubMenu.tsx +++ b/src/shared/components/CustomerSubMenu.tsx @@ -17,7 +17,7 @@ const CustomerSubMenu: FC = () => {
diff --git a/src/shared/components/DashboardSubMenu.tsx b/src/shared/components/DashboardSubMenu.tsx index ba9e314..36ced13 100644 --- a/src/shared/components/DashboardSubMenu.tsx +++ b/src/shared/components/DashboardSubMenu.tsx @@ -14,7 +14,7 @@ const DashboardSubMenu: FC = () => {
diff --git a/src/shared/components/FinancialSubMenu.tsx b/src/shared/components/FinancialSubMenu.tsx index 8f7cc1a..80063cb 100644 --- a/src/shared/components/FinancialSubMenu.tsx +++ b/src/shared/components/FinancialSubMenu.tsx @@ -15,7 +15,7 @@ const FinancialSubMenu: FC = () => {
diff --git a/src/shared/components/JobsSubMenu.tsx b/src/shared/components/JobsSubMenu.tsx index 244c435..b4b4b13 100644 --- a/src/shared/components/JobsSubMenu.tsx +++ b/src/shared/components/JobsSubMenu.tsx @@ -14,7 +14,7 @@ const JobsSubMenu: FC = () => {
diff --git a/src/shared/components/LearningSubMenu.tsx b/src/shared/components/LearningSubMenu.tsx index d7f8e3a..2016442 100644 --- a/src/shared/components/LearningSubMenu.tsx +++ b/src/shared/components/LearningSubMenu.tsx @@ -19,7 +19,7 @@ const LearningSubMenu: FC = () => {
diff --git a/src/shared/components/OrdersSubMenu.tsx b/src/shared/components/OrdersSubMenu.tsx index 6b2ddac..29cd408 100644 --- a/src/shared/components/OrdersSubMenu.tsx +++ b/src/shared/components/OrdersSubMenu.tsx @@ -13,7 +13,7 @@ const OrdersSubMenu: FC = () => {
diff --git a/src/shared/components/PagesSubMenu.tsx b/src/shared/components/PagesSubMenu.tsx index aeb89da..9ec119a 100644 --- a/src/shared/components/PagesSubMenu.tsx +++ b/src/shared/components/PagesSubMenu.tsx @@ -15,7 +15,7 @@ const PagesSubMenu: FC = () => {
diff --git a/src/shared/components/ProductsSubMenu.tsx b/src/shared/components/ProductsSubMenu.tsx index c325c17..0aec11f 100644 --- a/src/shared/components/ProductsSubMenu.tsx +++ b/src/shared/components/ProductsSubMenu.tsx @@ -15,7 +15,7 @@ const ProductsSubMenu: FC = () => {
diff --git a/src/shared/components/ReceiptSubMenu.tsx b/src/shared/components/ReceiptSubMenu.tsx index d5757c1..9846c5d 100644 --- a/src/shared/components/ReceiptSubMenu.tsx +++ b/src/shared/components/ReceiptSubMenu.tsx @@ -19,7 +19,7 @@ const ReceiptSubMenu: FC = () => {
diff --git a/src/shared/components/ReportsSubMenu.tsx b/src/shared/components/ReportsSubMenu.tsx index bfeca37..9151ce1 100644 --- a/src/shared/components/ReportsSubMenu.tsx +++ b/src/shared/components/ReportsSubMenu.tsx @@ -15,7 +15,7 @@ const ReportsSubMenu: FC = () => {
diff --git a/src/shared/components/SellersSubMenu.tsx b/src/shared/components/SellersSubMenu.tsx index e187d8d..46fc554 100644 --- a/src/shared/components/SellersSubMenu.tsx +++ b/src/shared/components/SellersSubMenu.tsx @@ -15,7 +15,7 @@ const SellersSubMenu: FC = () => {
diff --git a/src/shared/components/ServicesSubMenu.tsx b/src/shared/components/ServicesSubMenu.tsx index 78a16cf..5142b1e 100644 --- a/src/shared/components/ServicesSubMenu.tsx +++ b/src/shared/components/ServicesSubMenu.tsx @@ -20,7 +20,7 @@ const ServicesSubMenu: FC = () => {
diff --git a/src/shared/components/SettingsSubMenu.tsx b/src/shared/components/SettingsSubMenu.tsx index 02a976e..bdb8d35 100644 --- a/src/shared/components/SettingsSubMenu.tsx +++ b/src/shared/components/SettingsSubMenu.tsx @@ -15,7 +15,7 @@ const SettingsSubMenu: FC = () => {
diff --git a/src/shared/components/ShippingSubMenu.tsx b/src/shared/components/ShippingSubMenu.tsx index 65d709d..dce22b8 100644 --- a/src/shared/components/ShippingSubMenu.tsx +++ b/src/shared/components/ShippingSubMenu.tsx @@ -14,7 +14,7 @@ const ShippingSubMenu: FC = () => {
diff --git a/src/shared/components/SubMenuItem.tsx b/src/shared/components/SubMenuItem.tsx index cdaa234..ad98574 100644 --- a/src/shared/components/SubMenuItem.tsx +++ b/src/shared/components/SubMenuItem.tsx @@ -15,13 +15,13 @@ const SubMenuItem: FC = (props: Props) => { 'flex text-xs gap-6 mt-1', )}>
-
+
{props.title}
diff --git a/src/shared/components/SupportSubMenu.tsx b/src/shared/components/SupportSubMenu.tsx index 35b61f3..4dfec55 100644 --- a/src/shared/components/SupportSubMenu.tsx +++ b/src/shared/components/SupportSubMenu.tsx @@ -20,7 +20,7 @@ const SupportSubMenu: FC = () => {
diff --git a/src/shared/components/TicketSubMenu.tsx b/src/shared/components/TicketSubMenu.tsx index 0ffcc7d..4670b6a 100644 --- a/src/shared/components/TicketSubMenu.tsx +++ b/src/shared/components/TicketSubMenu.tsx @@ -20,7 +20,7 @@ const TicketSubMenu: FC = () => {
diff --git a/src/shared/components/TicketsSubMenu.tsx b/src/shared/components/TicketsSubMenu.tsx index 8d6d907..8bec356 100644 --- a/src/shared/components/TicketsSubMenu.tsx +++ b/src/shared/components/TicketsSubMenu.tsx @@ -15,7 +15,7 @@ const TicketsSubMenu: FC = () => {
diff --git a/src/shared/components/TransactionsSubMenu.tsx b/src/shared/components/TransactionsSubMenu.tsx index e7629f7..8502712 100644 --- a/src/shared/components/TransactionsSubMenu.tsx +++ b/src/shared/components/TransactionsSubMenu.tsx @@ -16,7 +16,7 @@ const TransactionsSubMenu: FC = () => {
diff --git a/src/shared/components/UsersSubMenu.tsx b/src/shared/components/UsersSubMenu.tsx index ff8a963..fe90f45 100644 --- a/src/shared/components/UsersSubMenu.tsx +++ b/src/shared/components/UsersSubMenu.tsx @@ -15,7 +15,7 @@ const UsersSubMenu: FC = () => {
diff --git a/src/shared/store/sharedStore.ts b/src/shared/store/sharedStore.ts index be86860..bd93a94 100644 --- a/src/shared/store/sharedStore.ts +++ b/src/shared/store/sharedStore.ts @@ -8,4 +8,6 @@ export const useSharedStore = create((set) => ({ setSubtMenu: (value: boolean) => set({ hasSubMenu: value }), subMenuName: "", setSubMenuName: (value: string) => set({ subMenuName: value }), + search: "", + setSearch: (value: string) => set({ search: value }), })); diff --git a/src/shared/types/SharedTypes.ts b/src/shared/types/SharedTypes.ts index ee50cd0..8eb851c 100644 --- a/src/shared/types/SharedTypes.ts +++ b/src/shared/types/SharedTypes.ts @@ -5,6 +5,8 @@ export type SharedStoreType = { setSubtMenu: (value: boolean) => void; subMenuName: string; setSubMenuName: (value: string) => void; + search: string; + setSearch: (value: string) => void; }; export type PagerType = {