Files
ontime/apps/client/src/common/stores/entryCopyStore.ts
T
2026-02-08 11:20:09 +01:00

15 lines
445 B
TypeScript

import { create } from 'zustand';
type EntryCopyStore = {
entryCopyId: string | null;
entryCopyMode: 'copy' | 'cut';
setEntryCopyId: (eventId: string | null, mode?: 'copy' | 'cut') => void;
};
export const useEntryCopy = create<EntryCopyStore>()((set) => ({
entryCopyId: null,
entryCopyMode: 'copy',
setEntryCopyId: (entryCopyId: string | null, mode: 'copy' | 'cut' = 'copy') =>
set({ entryCopyId, entryCopyMode: mode }),
}));