From be852f4546d46cbbb50c998cfeae7ee9a70a9f23 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Fri, 24 May 2024 13:19:46 +0200 Subject: [PATCH] refactor: allow hiding sidebar --- .../client/src/features/rundown/RundownExport.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/client/src/features/rundown/RundownExport.tsx b/apps/client/src/features/rundown/RundownExport.tsx index dea4dcf7b..d3e52b9c7 100644 --- a/apps/client/src/features/rundown/RundownExport.tsx +++ b/apps/client/src/features/rundown/RundownExport.tsx @@ -3,6 +3,7 @@ import { IoArrowUp } from '@react-icons/all-files/io5/IoArrowUp'; import { ContextMenu } from '../../common/components/context-menu/ContextMenu'; import ErrorBoundary from '../../common/components/error-boundary/ErrorBoundary'; +import { useAppMode } from '../../common/stores/appModeStore'; import { handleLinks } from '../../common/utils/linkUtils'; import { cx } from '../../common/utils/styleUtils'; @@ -13,6 +14,8 @@ import style from './RundownExport.module.scss'; const RundownExport = () => { 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]); @@ -27,11 +30,13 @@ const RundownExport = () => { -
- - - -
+ {!hideSideBar && ( +
+ + + +
+ )} );