From cdaae66e9484aa70066c1c2f9031e68195d5b351 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sat, 21 Jan 2023 23:19:17 -0800 Subject: [PATCH] Add skip links for content, player and footer. For #1826 --- web/components/layouts/Main/Main.tsx | 11 ++++++++++- web/components/ui/Content/Content.tsx | 2 +- web/components/ui/Footer/Footer.tsx | 2 +- web/components/ui/Header/Header.module.scss | 15 +++++++++++++++ web/components/ui/Header/Header.tsx | 14 ++++++++++++++ .../video/OwncastPlayer/OwncastPlayer.tsx | 2 +- web/pages/embed/chat/readwrite/index.tsx | 6 +++++- 7 files changed, 47 insertions(+), 5 deletions(-) diff --git a/web/components/layouts/Main/Main.tsx b/web/components/layouts/Main/Main.tsx index 1aa380d05..709a34c20 100644 --- a/web/components/layouts/Main/Main.tsx +++ b/web/components/layouts/Main/Main.tsx @@ -11,6 +11,7 @@ import { isChatAvailableSelector, clientConfigStateAtom, fatalErrorStateAtom, + appStateAtom, } from '../../stores/ClientConfigStore'; import { Content } from '../../ui/Content/Content'; import { Header } from '../../ui/Header/Header'; @@ -22,6 +23,7 @@ import { ServerRenderedHydration } from '../../ServerRendered/ServerRenderedHydr import { Theme } from '../../theme/Theme'; import styles from './Main.module.scss'; import { PushNotificationServiceWorker } from '../../workers/PushNotificationServiceWorker/PushNotificationServiceWorker'; +import { AppStateOptions } from '../../stores/application-state'; const lockBodyStyle = ` body { @@ -46,9 +48,11 @@ export const Main: FC = () => { const { name, title, customStyles } = clientConfig; const isChatAvailable = useRecoilValue(isChatAvailableSelector); const fatalError = useRecoilValue(fatalErrorStateAtom); + const appState = useRecoilValue(appStateAtom); const layoutRef = useRef(null); const { chatDisabled } = clientConfig; + const { videoAvailable } = appState; useEffect(() => { setupNoLinkReferrer(layoutRef.current); @@ -137,7 +141,12 @@ export const Main: FC = () => {