remove ambigous colorScheme from ThemeContext (it did nothing)

This commit is contained in:
Ansh Nanda
2023-05-05 15:56:47 -07:00
parent 8eaf1834cb
commit 610ae64dab
+2 -4
View File
@@ -89,11 +89,9 @@ export const ThemeProvider: React.FC<ThemeProviderProps> = ({
theme,
children,
}) => {
const colorScheme = useColorScheme()
const value = useMemo(
() => ((theme || colorScheme) === 'dark' ? darkTheme : defaultTheme),
[colorScheme, theme],
() => (theme === 'dark' ? darkTheme : defaultTheme),
[theme],
)
return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>