14 lines
267 B
TypeScript
14 lines
267 B
TypeScript
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 }),
|
|
};
|
|
});
|