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

feat: avoid refresh if new locale is already the current locale #322

Merged
merged 3 commits into from
Jan 1, 2024

Conversation

moinulmoin
Copy link
Contributor

So, currently, if we set the locale that is already set, it rerenders the page. To avoid this, I think an early locale check would be helpful.

Here is the record:
https://github.com/QuiiBz/next-international/assets/63459189/fa926b15-97dc-4ecb-b41e-9aac8f21cca5

Copy link

vercel bot commented Jan 1, 2024

@moinulmoin is attempting to deploy a commit to the Tom Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

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

Happy new year! One comment:

@moinulmoin
Copy link
Contributor Author

Happy new year!

Happy New Year! 🎉

Copy link

vercel bot commented Jan 1, 2024

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

Name Status Preview Comments Updated (UTC)
next-international ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 1, 2024 8:54am

Copy link
Owner

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

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

Thanks!

@QuiiBz QuiiBz changed the title feat: ✨ return if newLocale is already set feat: avoid refresh if new locale is already the current locale Jan 1, 2024
@QuiiBz QuiiBz merged commit b82abee into QuiiBz:main Jan 1, 2024
6 checks passed
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.

None yet

2 participants