Files
ontime/apps/client/src/features/overview/composite/TitleOverview.tsx
T
Carlos Valente 48c76947c5 refactor(rundown): bind each surface to its data source
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.
2026-09-13 20:23:53 +02:00

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>
);
}