Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions client/src/context/ThemeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* Initial value resolution order:
* 1. `huddle-theme` in localStorage (if the user has flipped it before)
* 2. The OS `prefers-color-scheme` media query
* 2. Light mode (default — we don't follow the OS preference)
*
* Wired into the global provider stack in `providers/AppProviders.tsx`,
* and the toggle is exposed in the top nav via AppShell.
Expand Down Expand Up @@ -38,9 +38,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
const [theme, setTheme] = useState<Theme>(() => {
const stored = localStorage.getItem("huddle-theme") as Theme | null;
if (stored === "light" || stored === "dark") return stored;
return window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light";
return "light";
});

useEffect(() => {
Expand Down