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

bugfix: webpage theme is now consistent across page reloads #1133

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dylan-dot-c
Copy link
Contributor

@dylan-dot-c dylan-dot-c commented Oct 4, 2024

Description

Fixed the issue at #1131, where the current theme of the website is lost when you reload the page. So, if I change my theme to dark mode, it won't persist across the page reload.

Related Issues

#1131

Changes Proposed

  • properly implemented the useTheme hook in the sideBar component
  • removed the redundant and insufficient state management in the sidebar component for the theme.
  • fixed spelling errors
  • changed default theme from dark to light
  • moved the updating of the localStorage from toggleTheme function to the useEffect

Checklist

  • I have read and followed the Contribution Guidelines.
  • All new and existing tests passed.
  • I have updated the documentation to reflect the changes I've made.
  • My code follows the code style of this project.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dev-find ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 3:50pm

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Great job, @dylan-dot-c! 🎉 Thank you for opening a pull request. Your contribution is valuable and we appreciate your efforts to improve our project.

Soon the maintainers/owner will review it and provide you with feedback/suggestions.

@shyamtawli
Copy link
Owner

@dylan-dot-c make dark as default

@shyamtawli shyamtawli added enhancement New feature or request changes-requested labels Oct 4, 2024
@dylan-dot-c
Copy link
Contributor Author

@shyamtawli will do

@dylan-dot-c
Copy link
Contributor Author

@shyamtawli made the change

@dylan-dot-c
Copy link
Contributor Author

@shyamtawli is there something wrong? Why haven't this pr been merged yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes-requested enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants