catalog part connected to backend , added empty data and loading component

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-02-05 19:56:23 +05:00
parent 3cf5e0efcf
commit 34cb524626
12 changed files with 249 additions and 19 deletions

18
store/useSubCategory.ts Normal file
View File

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