diff --git a/src/context/App.tsx b/src/context/App.tsx index e43a27ab6..77001116c 100644 --- a/src/context/App.tsx +++ b/src/context/App.tsx @@ -981,8 +981,8 @@ const isLabel = (item: any) => !item?.url && item?.name const getInitialSiteSettings = (isMobile: boolean, compact: boolean) => { const siteSettings = { experience: 'posthog', - colorMode: 'light', - theme: 'light', + colorMode: (typeof window !== 'undefined' && (window as any).__theme) || 'light', + theme: (typeof window !== 'undefined' && (window as any).__theme) || 'light', skinMode: 'modern', cursor: 'default', wallpaper: 'keyboard-garden', diff --git a/static/scripts/theme-init.js b/static/scripts/theme-init.js index 4f383a7de..ad4391a89 100644 --- a/static/scripts/theme-init.js +++ b/static/scripts/theme-init.js @@ -7,7 +7,6 @@ window.__onThemeChange(newTheme) } var preferredTheme - var slug = window.location.pathname.substring(1) var darkQuery = window.matchMedia('(prefers-color-scheme: dark)') darkQuery.addListener(function (e) { if (!localStorage.getItem('theme')) {