Closed Strange-Quark-007 closed 7 months ago
In AppBar.js file const { colorMode } = React.useContext(ColorModeContext);
const { colorMode } = React.useContext(ColorModeContext);
for debugging when I console logged colorMode - I was getting undefined
The main App function in App.js was not wrapped with ThemeProvider. So App and all childrens didn't have any access to the context
I wrapped the App with the provider and now it should work
In AppBar.js file
const { colorMode } = React.useContext(ColorModeContext);
for debugging when I console logged colorMode - I was getting undefined
The main App function in App.js was not wrapped with ThemeProvider. So App and all childrens didn't have any access to the context
I wrapped the App with the provider and now it should work