set initial theme (#13411)

This commit is contained in:
Eli Kinsey
2025-10-27 12:24:54 -07:00
committed by GitHub
parent ffac8c3747
commit 1fb32e759c
2 changed files with 2 additions and 3 deletions

View File

@@ -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',

View File

@@ -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')) {