Skip to content
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

Merged
merged 5 commits into from
Nov 7, 2023

Conversation

coder12git
Copy link
Member

Notes for Reviewers

This PR fixes #235

Signed commits

  • Yes, I signed my commits.

@github-actions github-actions bot added area/docs Improvements or additions to documentation area/site labels Nov 7, 2023
@coder12git coder12git changed the title Fix deployment build failure Fix Sistent Website build failure Nov 7, 2023
@coder12git
Copy link
Member Author

cc @leecalcote @aabidsofi19
I have deleted the 'gatsby-plugin-dark-mode' package that was causing the build failure and added the dark-mode feature using 'React-Context'.

<>
const Navbar = () => {
return (
<ThemeContext.Consumer>
Copy link
Contributor

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

componentDidMount() {
// Getting dark mode value from localStorage!
const lsDark = JSON.parse(localStorage.getItem("dark"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo , should be isDark

window.matchMedia("(prefers-color-scheme: dark)").matches === true

class ThemeProvider extends React.Component {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Functional components

@aabidsofi19
Copy link
Contributor

Thank you @coder12git , i have added some feedback .

@coder12git
Copy link
Member Author

Thank you @coder12git , i have added some feedback .

Yes change it to functional in recent push

@coder12git
Copy link
Member Author

coder12git commented Nov 7, 2023

@aabidsofi19 fixed all the changes requested

@nebula-aac
Copy link
Contributor

Once this is merged, we will need to update the components that do not have a proper export

@aabidsofi19 aabidsofi19 merged commit bcb52f1 into layer5io:master Nov 7, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Improvements or additions to documentation area/site
Development

Successfully merging this pull request may close these issues.

Fixing Site build failure
3 participants