mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 05:34:09 +00:00
0e6d6cd416
* refactor: allow secondary rundowns * ui: move dropdown * feat: follow loaded * ui: background edit warning ui: fix disable radio button * feat(ui): add loaded sufix in the rundown list * feat(ui): add direct link to background edit from rundown manager * fix: better fallback * fix: default to is isCurrentRundown for nav bar colour * chore: rename navigate to cuesheet --------- Co-authored-by: alex-arc <ac@omnivox.dk>
31 lines
812 B
TypeScript
31 lines
812 B
TypeScript
import { Rundown } from 'ontime-types';
|
|
import { memo } from 'react';
|
|
|
|
import Modal from '../../../common/components/modal/Modal';
|
|
import CuesheetEntryEditor from '../../../features/rundown/entry-editor/CuesheetEventEditor';
|
|
import { useEditModal } from './useEditModal';
|
|
|
|
interface EntryEditModalProps {
|
|
rundown: Rundown;
|
|
}
|
|
|
|
export default memo(EntryEditModal);
|
|
function EntryEditModal({ rundown }: EntryEditModalProps) {
|
|
const entryId = useEditModal((state) => state.selectedEntryId);
|
|
const closeModal = useEditModal((state) => state.clearSelection);
|
|
|
|
if (entryId === null) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Modal
|
|
isOpen
|
|
onClose={closeModal}
|
|
title='Edit entry'
|
|
showCloseButton
|
|
bodyElements={<CuesheetEntryEditor entryId={entryId} rundown={rundown} />}
|
|
/>
|
|
);
|
|
}
|