Files
sage-home/stores/sectionStore.ts

15 lines
387 B
TypeScript
Raw Normal View History

2026-01-24 16:54:44 +08:00
import { create } from "zustand";
export type SectionItem = { id: string; name: string };
type SectionStore = {
sections: SectionItem[];
setSections: (items: SectionItem[]) => void;
clear: () => void;
};
export const useSectionStore = create<SectionStore>((set) => ({
sections: [],
setSections: (items) => set({ sections: items }),
clear: () => set({ sections: [] }),
}));