file name and location updayed for better be

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-03-07 16:31:18 +05:00
parent b838025ab0
commit 809438735f
82 changed files with 87 additions and 470 deletions

20
zustand/useSubCategory.ts Normal file
View File

@@ -0,0 +1,20 @@
import { SubCategoryType } from "@/lib/types";
import { create } from "zustand";
interface SubCategoryZustandType {
subCategory: SubCategoryType;
setSubCategory: (subCategory: SubCategoryType) => void;
clearSubCategory: () => void;
}
const demoSubCategory = {
id: 0,
name: "",
category: 0,
image: "",
};
export const useSubCategory = create<SubCategoryZustandType>((set) => ({
subCategory: demoSubCategory,
setSubCategory: (data) => set({ subCategory: data }),
clearSubCategory: () => set({ subCategory: demoSubCategory }),
}));