diff --git a/src/hooks/use-attendees-store.tsx b/src/hooks/use-attendees-store.tsx new file mode 100644 index 0000000..c4049c0 --- /dev/null +++ b/src/hooks/use-attendees-store.tsx @@ -0,0 +1,15 @@ +import { Attendee } from "@/lib/types"; +import { create } from "zustand"; + +type AttendeesState = { + parsedAttendees: Attendee[]; + setParsedAttendees: (attendees: Attendee[]) => void; +}; + +export const useAttendeesStore = create()((set) => ({ + parsedAttendees: [] as Attendee[], + setParsedAttendees: (attendees) => + set(() => ({ + parsedAttendees: attendees, + })), +})); diff --git a/src/hooks/use-dialog-store.tsx b/src/hooks/use-dialog-store.tsx new file mode 100644 index 0000000..1904f49 --- /dev/null +++ b/src/hooks/use-dialog-store.tsx @@ -0,0 +1,11 @@ +import { create } from "zustand"; + +type DialogState = { + importDialog: boolean; + setImportDialog: (state: boolean) => void; +}; + +export const useDialogStore = create()((set) => ({ + importDialog: false, + setImportDialog: (state) => set(() => ({ importDialog: state })), +}));