cal.pub0.org/packages/features/users/components/UserTable/EditSheet/store.ts

16 lines
436 B
TypeScript

import { create } from "zustand";
interface EditModeState {
editMode: boolean;
setEditMode: (editMode: boolean) => void;
mutationLoading: boolean;
setMutationloading: (loading: boolean) => void;
}
export const useEditMode = create<EditModeState>((set) => ({
editMode: false,
setEditMode: (editMode) => set({ editMode }),
mutationLoading: false,
setMutationloading: (loading) => set({ mutationLoading: loading }),
}));