Skip to content

Conversation

@divy-03
Copy link
Member

@divy-03 divy-03 commented Oct 12, 2025

Description:

This PR fixes the dark mode functionality for Learn Git & GitHub page where it was previously not working.
I updated the DarkModeButton component to correctly detect and apply the user’s theme preference using localStorage and matchMedia.

Changes Made:

  • Fixed logic to check and set the theme on initial load.
  • Updated localStorage handling for theme persistence.
  • Ensured dark mode toggling now works as expected.

Result:

Dark mode now applies properly across sessions and reflects the system preference when no explicit theme is set.

image

@netlify
Copy link

netlify bot commented Oct 12, 2025

Deploy Preview for yfosp ready!

Name Link
🔨 Latest commit 9eb2d10
🔍 Latest deploy log https://app.netlify.com/projects/yfosp/deploys/68eb4ad2566b9e00085878af
😎 Deploy Preview https://deploy-preview-185--yfosp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@melvincwng
Copy link
Member

Hi @divy-03, please join YFOSP organization first before submitting a PR - https://github.com/yfosp/start-here

Copy link
Member

@melvincwng melvincwng left a comment

Choose a reason for hiding this comment

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

Also @divy-03, when you submit a PR - please add yourself as a contributor in these 2 files below:

  1. https://github.com/yfosp/main-website/blob/main/community-website/pages/contributors.tsx
  2. 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!

@divy-03
Copy link
Member Author

divy-03 commented Oct 12, 2025

I've made the requested changes and added myself as a contributor.
Please review it @melvincwng
Also, just wanted to confirm — since this project is part of Hacktoberfest, will this PR get the Hacktoberfest tag as well? 🎃
Thanks

Copy link
Member

@melvincwng melvincwng left a comment

Choose a reason for hiding this comment

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

LGTM

@melvincwng melvincwng merged commit a6e1c04 into yfosp:main Oct 12, 2025
4 checks passed
@melvincwng
Copy link
Member

Thanks for the fix @divy-03 , good catch!

Happy hacktoberfest, added the labels already!

@yfosp yfosp locked and limited conversation to collaborators Oct 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants