diff --git a/frontend/src/hooks/use-theme.ts b/frontend/src/hooks/use-theme.ts index f56f35385..a2a137934 100644 --- a/frontend/src/hooks/use-theme.ts +++ b/frontend/src/hooks/use-theme.ts @@ -32,6 +32,9 @@ export const useTheme = () => { }; const updateTheme = (theme: string) => { + if (theme === 'auto') { + theme = prefersDark.matches ? 'dark' : 'light'; + } const body = document.documentElement as HTMLElement; body.setAttribute('class', theme); };