mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-19 22:24:11 +00:00
15 lines
452 B
TypeScript
15 lines
452 B
TypeScript
import { EntryId } from 'ontime-types';
|
|
import { create } from 'zustand';
|
|
|
|
interface SelectedEntryState {
|
|
selectedEntryId: EntryId | null;
|
|
setEditableEntry: (entryId: EntryId) => void;
|
|
clearSelection: () => void;
|
|
}
|
|
|
|
export const useEditModal = create<SelectedEntryState>((set) => ({
|
|
selectedEntryId: null,
|
|
setEditableEntry: (entryId: EntryId) => set({ selectedEntryId: entryId }),
|
|
clearSelection: () => set({ selectedEntryId: null }),
|
|
}));
|