import { memo } from 'react'; import { useSessionStorage } from '@mantine/hooks'; import { Corner } from '../../common/components/editor-utils/EditorUtils'; import ErrorBoundary from '../../common/components/error-boundary/ErrorBoundary'; import ViewNavigationMenu from '../../common/components/navigation-menu/ViewNavigationMenu'; import ProtectRoute from '../../common/components/protect-route/ProtectRoute'; import { useIsSmallDevice } from '../../common/hooks/useIsSmallDevice'; import { handleLinks } from '../../common/utils/linkUtils'; import { cx } from '../../common/utils/styleUtils'; import { AppMode, sessionKeys } from '../../ontimeConfig'; import RundownEntryEditor from './entry-editor/RundownEntryEditor'; import FinderPlacement from './placements/FinderPlacement'; import { RundownContextMenu } from './rundown-context-menu/RundownContextMenu'; import RundownWrapper from './RundownWrapper'; import style from './RundownExport.module.scss'; export default memo(RundownExport); function RundownExport() { const isExtracted = window.location.pathname.includes('/rundown'); const [editorMode] = useSessionStorage({ key: sessionKeys.editorMode, defaultValue: AppMode.Edit, }); const isSmallDevice = useIsSmallDevice(); if (isSmallDevice && isExtracted) { return ( ); } const hideSideBar = isExtracted && editorMode === 'run'; return ( handleLinks('rundown', event)} /> {!hideSideBar && ( )} ); }