This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-04-15 13:00:36 +05:00
parent 18b2bfdfc4
commit afe402a58a
209 changed files with 249 additions and 171 deletions

27
store/subCategory.ts Normal file
View File

@@ -0,0 +1,27 @@
import { create } from "zustand";
// Type definition
interface SubCategory {
name: string;
id: number;
}
interface SubCategoryStore {
initialSubCategory: SubCategory;
setInitialSubCategory: (data: SubCategory) => void;
clearSubCategory: () => void;
}
export const useSubCategory = create<SubCategoryStore>((set) => ({
initialSubCategory: {
name: "",
id: 0,
},
setInitialSubCategory: (data) => set({ initialSubCategory: data }),
clearSubCategory: () =>
set({
initialSubCategory: { name: "", id: 0 },
}),
}));