refactor: expose actions through context

This commit is contained in:
Carlos Valente
2026-01-06 18:27:56 +01:00
committed by Carlos Valente
parent 1f8065143a
commit e25725ea8b
21 changed files with 138 additions and 90 deletions
+2 -2
View File
@@ -32,13 +32,13 @@ import {
reorderArray,
} from 'ontime-utils';
import { useEntryActions } from '../../common/hooks/useEntryAction';
import useFollowComponent from '../../common/hooks/useFollowComponent';
import { useRundownEditor } from '../../common/hooks/useSocket';
import { useEntryCopy } from '../../common/stores/entryCopyStore';
import { lastMetadataKey, RundownMetadataObject } from '../../common/utils/rundownMetadata';
import { AppMode, sessionKeys } from '../../ontimeConfig';
import { useRundownEntryActions } from './context/RundownActionsContext';
import QuickAddButtons from './entry-editor/quick-add-buttons/QuickAddButtons';
import QuickAddInline from './entry-editor/quick-add-cursor/QuickAddInline';
import RundownGroup from './rundown-group/RundownGroup';
@@ -72,7 +72,7 @@ export default function Rundown({ data, rundownMetadata }: RundownProps) {
});
const collapsedGroupSet = useMemo(() => new Set(collapsedGroups), [collapsedGroups]);
const { addEntry, clone, deleteEntry, move, reorderEntry } = useEntryActions();
const { addEntry, clone, deleteEntry, move, reorderEntry } = useRundownEntryActions();
const setEntryCopyId = useEntryCopy((state) => state.setEntryCopyId);
// cursor