devFind icon indicating copy to clipboard operation
devFind copied to clipboard

bugfix: webpage theme is now consistent across page reloads

Open dylan-dot-c opened this issue 1 year ago • 4 comments

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

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

Screenshots

Note to reviewers

dylan-dot-c avatar Oct 04 '24 03:10 dylan-dot-c

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

vercel[bot] avatar Oct 04 '24 03:10 vercel[bot]

@dylan-dot-c make dark as default

shyamtawli avatar Oct 04 '24 11:10 shyamtawli

@shyamtawli will do

dylan-dot-c avatar Oct 04 '24 11:10 dylan-dot-c

@shyamtawli made the change

dylan-dot-c avatar Oct 04 '24 13:10 dylan-dot-c

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

dylan-dot-c avatar Dec 04 '24 15:12 dylan-dot-c