mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 17:33:55 +00:00
15 lines
445 B
TypeScript
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 }),
|
|
}));
|