-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Sistent Website build failure #241
Conversation
Signed-off-by: coder12git <[email protected]>
cc @leecalcote @aabidsofi19 |
<> | ||
const Navbar = () => { | ||
return ( | ||
<ThemeContext.Consumer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use useContext
than context.consumer . former makes code more readable
site/src/components/Theme/index.js
Outdated
componentDidMount() { | ||
// Getting dark mode value from localStorage! | ||
const lsDark = JSON.parse(localStorage.getItem("dark")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo , should be isDark
site/src/components/Theme/index.js
Outdated
window.matchMedia("(prefers-color-scheme: dark)").matches === true | ||
|
||
class ThemeProvider extends React.Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use Functional components
Thank you @coder12git , i have added some feedback . |
Signed-off-by: coder12git <[email protected]>
Yes change it to functional in recent push |
…stent into sistent-site-draft
Signed-off-by: coder12git <[email protected]>
@aabidsofi19 fixed all the changes requested |
Once this is merged, we will need to update the components that do not have a proper export |
Notes for Reviewers
This PR fixes #235
Signed commits