mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-23 16:09:11 +00:00
refactor: allow hiding sidebar
This commit is contained in:
committed by
Carlos Valente
parent
84e224dd71
commit
be852f4546
@@ -3,6 +3,7 @@ import { IoArrowUp } from '@react-icons/all-files/io5/IoArrowUp';
|
|||||||
|
|
||||||
import { ContextMenu } from '../../common/components/context-menu/ContextMenu';
|
import { ContextMenu } from '../../common/components/context-menu/ContextMenu';
|
||||||
import ErrorBoundary from '../../common/components/error-boundary/ErrorBoundary';
|
import ErrorBoundary from '../../common/components/error-boundary/ErrorBoundary';
|
||||||
|
import { useAppMode } from '../../common/stores/appModeStore';
|
||||||
import { handleLinks } from '../../common/utils/linkUtils';
|
import { handleLinks } from '../../common/utils/linkUtils';
|
||||||
import { cx } from '../../common/utils/styleUtils';
|
import { cx } from '../../common/utils/styleUtils';
|
||||||
|
|
||||||
@@ -13,6 +14,8 @@ import style from './RundownExport.module.scss';
|
|||||||
|
|
||||||
const RundownExport = () => {
|
const RundownExport = () => {
|
||||||
const isExtracted = window.location.pathname.includes('/rundown');
|
const isExtracted = window.location.pathname.includes('/rundown');
|
||||||
|
const appMode = useAppMode((state) => state.mode);
|
||||||
|
const hideSideBar = isExtracted && appMode === 'run';
|
||||||
|
|
||||||
const classes = cx([style.rundownExport, isExtracted && style.extracted]);
|
const classes = cx([style.rundownExport, isExtracted && style.extracted]);
|
||||||
|
|
||||||
@@ -27,11 +30,13 @@ const RundownExport = () => {
|
|||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
</div>
|
</div>
|
||||||
<div className={style.side}>
|
{!hideSideBar && (
|
||||||
<ErrorBoundary>
|
<div className={style.side}>
|
||||||
<EventEditor />
|
<ErrorBoundary>
|
||||||
</ErrorBoundary>
|
<EventEditor />
|
||||||
</div>
|
</ErrorBoundary>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user