add additional filter to product page
This commit is contained in:
13
zustand/useCatalog.ts
Normal file
13
zustand/useCatalog.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { create } from "zustand";
|
||||
|
||||
type CatalogType = {
|
||||
parentID: number;
|
||||
setParentID: (id: number) => void;
|
||||
};
|
||||
|
||||
export const useCatalog = create<CatalogType>((set) => {
|
||||
return {
|
||||
parentID: 0,
|
||||
setParentID: (id: number) => set({ parentID: id }),
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user