From 646c5616da7c8c40b6ef7d09d490b956b836c3b5 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Fri, 5 May 2023 14:37:01 -0700 Subject: [PATCH] fix(footer): add dynamic right padding to fix footer overflowing. Closes #2988 --- web/components/layouts/Main/Main.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/components/layouts/Main/Main.tsx b/web/components/layouts/Main/Main.tsx index e4ae0c812..076ba399a 100644 --- a/web/components/layouts/Main/Main.tsx +++ b/web/components/layouts/Main/Main.tsx @@ -16,6 +16,7 @@ import { fatalErrorStateAtom, appStateAtom, serverStatusState, + isMobileAtom, } from '../../stores/ClientConfigStore'; import { Content } from '../../ui/Content/Content'; import { Header } from '../../ui/Header/Header'; @@ -50,12 +51,16 @@ export const Main: FC = () => { const isChatAvailable = useRecoilValue(isChatAvailableSelector); const fatalError = useRecoilValue(fatalErrorStateAtom); const appState = useRecoilValue(appStateAtom); + const isMobile = useRecoilValue(isMobileAtom); const layoutRef = useRef(null); const { chatDisabled } = clientConfig; const { videoAvailable } = appState; const { online, streamTitle, versionNumber: version } = clientStatus; + // accounts for sidebar width when online in desktop + const dynamicPadding = online && !isMobile ? '320px' : '0px'; + useEffect(() => { setupNoLinkReferrer(layoutRef.current); }, []); @@ -164,7 +169,9 @@ export const Main: FC = () => { {fatalError && ( )} -