useflyyer / next-rosetta

Next.js + Rosetta + TypeScript with native i18n support | Lightweight, simple, easy to integrate, no custom server required and efficient because will only download the locale you need.
https://next-rosetta.vercel.app
MIT License
64 stars 4 forks source link

Fix for the issue #40 #41

Closed pablohpsilva closed 2 years ago

pablohpsilva commented 2 years ago

Please check: https://github.com/useflyyer/next-rosetta/issues/40

Here's a quick fix for it. For some reason, while using turborepo, the useRouter is not ready when next-rosetta is running. Therefore, this small fix will set default values to it.

Please pay attention to the removal of !. It became obsolete since, defaultLocale always has a default value.

vercel[bot] commented 2 years ago

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

Name Status Preview Updated
next-rosetta ✅ Ready (Inspect) Visit Preview May 16, 2022 at 5:39PM (UTC)