diff --git a/vinvoor/src/providers/ThemeProvider.tsx b/vinvoor/src/providers/ThemeProvider.tsx index 957c63b..293b7c6 100644 --- a/vinvoor/src/providers/ThemeProvider.tsx +++ b/vinvoor/src/providers/ThemeProvider.tsx @@ -21,7 +21,7 @@ export const ThemeContext = createContext({ export const ThemeProvider: FC = ({ children }) => { const [themeMode, setThemeMode] = useState( - (import.meta.env.VITE_DEFAULT_THEME_MODE as ThemeMode) || "light", + window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ); const setTheme = (theme: ThemeMode) => {