Fix: Enable Dark mode for Learn Git page#185
Conversation
✅ Deploy Preview for yfosp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @divy-03, please join YFOSP organization first before submitting a PR - https://github.com/yfosp/start-here |
melvincwng
left a comment
There was a problem hiding this comment.
Also @divy-03, when you submit a PR - please add yourself as a contributor in these 2 files below:
- https://github.com/yfosp/main-website/blob/main/community-website/pages/contributors.tsx
- https://github.com/yfosp/main-website/blob/main/CONTRIBUTORS.md
So that if your PR gets merged, it will get automatically added into the website.
Please do the following above thing (this comment and previous comment) and tag me here again once its done
Thanks!
|
I've made the requested changes and added myself as a contributor. |
|
Thanks for the fix @divy-03 , good catch! Happy hacktoberfest, added the labels already! |
Description:
This PR fixes the dark mode functionality for
Learn Git & GitHubpage where it was previously not working.I updated the
DarkModeButtoncomponent to correctly detect and apply the user’s theme preference usinglocalStorageandmatchMedia.Changes Made:
Result:
Dark mode now applies properly across sessions and reflects the system preference when no explicit theme is set.