Skip to content

Commit 2bea5f2

Browse files
committed
fix: only use light theme on default theme values
1 parent 8d42efb commit 2bea5f2

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/components/ThemeProvider.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from "react";
22
import { PartialDeep } from "type-fest";
3-
import useDarkMode from "use-dark-mode";
43

54
export type Palette = {
65
primary: string;
@@ -58,11 +57,5 @@ export const ThemeProvider = (props: {
5857
};
5958

6059
export const getThemeValue = (key: keyof Palette) => {
61-
try {
62-
const darkMode = useDarkMode(false);
63-
return darkMode.value ? defaultTheme.dark![key] : defaultTheme.light![key];
64-
} catch {
65-
defaultTheme.light![key];
66-
// in case of error, return the default value
67-
}
60+
return defaultTheme.light![key];
6861
};

0 commit comments

Comments
 (0)