mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-14 10:39:37 +00:00
48c76947c5
Editable panels now share a rundown scope for data, selection, and mutations; runtime-only views resolve the loaded rundown explicitly. This also prevents stale data while switching scopes and provides the Operator editor with its mutation scope.
25 lines
762 B
TypeScript
25 lines
762 B
TypeScript
import { useLoadedRundownAuxData } from '../../../common/hooks-query/useLoadedRundown';
|
|
import useProjectData from '../../../common/hooks-query/useProjectData';
|
|
|
|
import style from './TitleOverview.module.scss';
|
|
|
|
export default function TitleOverview() {
|
|
'use memo';
|
|
const { data: projectData } = useProjectData();
|
|
const { data: rundownData } = useLoadedRundownAuxData();
|
|
|
|
const projectTitle = projectData.title.trim();
|
|
const rundownTitle = rundownData.title.trim();
|
|
|
|
if (!projectTitle && !rundownTitle) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div className={style.titleOverview}>
|
|
{projectTitle && <div className={style.project}>{projectTitle}</div>}
|
|
{rundownTitle && <div className={style.rundown}>{rundownTitle}</div>}
|
|
</div>
|
|
);
|
|
}
|