Skip to content

Commit

Permalink
[core] Fix a small bug in the ThemeContext
Browse files Browse the repository at this point in the history
  • Loading branch information
yamankatby committed Jan 20, 2022
1 parent e02258a commit 38ed53a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/base/ThemeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const useTheme = () => useContext(ThemeContext);
export const ThemeProvider: React.FC<ThemeProviderProps> = ({ theme, children }) => {
const colorScheme = useColorScheme();

const value = useMemo(() => (theme ?? colorScheme === "dark" ? darkTheme : defaultTheme), [colorScheme, theme]);
const value = useMemo(() => (theme ? theme : colorScheme === "dark" ? darkTheme : defaultTheme), [colorScheme, theme]);

return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;
};

0 comments on commit 38ed53a

Please sign in to comment.