Skip to content

persist-preferredLanguage #174

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

Merged

Conversation

PedroMarianoAlmeida
Copy link
Contributor

Before:

Screen.Recording.2025-03-30.at.1.08.42.AM.mov

After:

Screen.Recording.2025-03-30.at.1.09.56.AM.mov

Note: The localStorage.getItem('preferredLanguage') || 'JS'; was already on the code, so I just added the SET when the user updates the option

Copy link

vercel bot commented Mar 30, 2025

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
react-bits-ui ⬜️ Ignored (Inspect) Visit Preview Apr 2, 2025 1:28am

@DavidHDev
Copy link
Owner

Hi @PedroMarianoAlmeida , thanks for the work! The only reason why I didn't do this myself is because I consider that changing the language in the component page should instantly be reflected in the header as well and I didn't allocate time to implement this. Would you be interested in this challenge as part of your PR?

@PedroMarianoAlmeida
Copy link
Contributor Author

Screenshot 2025-03-31 at 3 08 10 PM It is that? Yep, I can take care of it on this MR =D

@DavidHDev
Copy link
Owner

Yep that's it :)

@PedroMarianoAlmeida
Copy link
Contributor Author

PedroMarianoAlmeida commented Apr 2, 2025

  • I followed the same code style and patterns as in SearchContext.
  • You can review the individual commits to see my step-by-step thought process, but I recommend squashing them into a single commit before merging.
  • The result is the screenshot attached
Screen.Recording.2025-04-01.at.10.26.25.PM.mov

Note: I was also considering persisting the Default/Tailwind option too (because I always need to click for the Tailwind option). Can I do it in a separate MR?

@DavidHDev
Copy link
Owner

Thanks! I don't really want to do the same for the styling choice, so I'd say just leave it as is.

@DavidHDev DavidHDev merged commit 949c5a0 into DavidHDev:main Apr 3, 2025
3 checks passed
AthalarBlizz pushed a commit to EventHorizon-Forge/ehfcreact-bits that referenced this pull request May 4, 2025
…ferredLanguage

persist-preferredLanguage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants