From a44e46619f3b58b4649ca59d800be99b9da9ed66 Mon Sep 17 00:00:00 2001 From: Topvennie Date: Sun, 20 Oct 2024 14:07:07 +0200 Subject: [PATCH] vinvoor: use system color default --- vinvoor/src/providers/ThemeProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) => {