diff --git a/beta/src/components/Layout/Nav/Nav.tsx b/beta/src/components/Layout/Nav/Nav.tsx index af8f2066..98a130ce 100644 --- a/beta/src/components/Layout/Nav/Nav.tsx +++ b/beta/src/components/Layout/Nav/Nav.tsx @@ -15,6 +15,13 @@ import {MenuContext} from 'components/useMenu'; import {Logo} from '../../Logo'; import NavLink from './NavLink'; +declare global { + interface Window { + __theme: string; + __setPreferredTheme: (theme: string) => void; + } +} + const feedbackIcon = ( { - if (typeof document === 'undefined') { - return false; - } - return document.documentElement.classList.contains('dark'); - }); const section = inferSection(pathname); function handleFeedback() { @@ -137,21 +136,28 @@ export default function Nav() { Beta - +
+ +
+
+ +
@@ -172,21 +178,28 @@ export default function Nav() { onClick={handleFeedback}> {feedbackIcon} - +
+ +
+
+ +
); diff --git a/beta/src/pages/_document.tsx b/beta/src/pages/_document.tsx index a948e9d8..51da08cc 100644 --- a/beta/src/pages/_document.tsx +++ b/beta/src/pages/_document.tsx @@ -12,6 +12,49 @@ class MyDocument extends Document { +