13 lines
308 B
TypeScript
13 lines
308 B
TypeScript
|
|
import {create} from 'zustand';
|
||
|
|
|
||
|
|
interface GroupState {
|
||
|
|
groups: { id: string; click: boolean }[];
|
||
|
|
setGroups: (groups: { id: string; click: boolean }[]) => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
const useGroupStore = create<GroupState>((set) => ({
|
||
|
|
groups: [],
|
||
|
|
setGroups: (groups) => set({ groups }),
|
||
|
|
}));
|
||
|
|
|
||
|
|
export { useGroupStore };
|