fix: default theme to light instead of following system preference

New users on dark-mode systems were seeing dark theme on first visit.
The default is now explicitly light, matching the API's DEFAULT_THEME.
Users can still switch to dark or system in settings.
This commit is contained in:
Siddharth Kumar Sah
2026-04-04 19:42:05 +08:00
parent bc2d9bcea1
commit 30908ed058
+2 -2
View File
@@ -17,8 +17,8 @@ function getSystemTheme(): "light" | "dark" {
export const useThemeStore = create<ThemeStore>()(
persist(
(set) => ({
theme: "system",
resolvedTheme: getSystemTheme(),
theme: "light" as Theme,
resolvedTheme: "light" as const,
setTheme: (theme) => {
const resolved = theme === "system" ? getSystemTheme() : theme;
document.documentElement.classList.toggle("dark", resolved === "dark");