Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Use i18next-browser-languagedetector (fixes #170) #172

Closed
wants to merge 2 commits into from

Conversation

NateWilliams2
Copy link
Contributor

No description provided.

@NateWilliams2 NateWilliams2 requested a review from selankon May 14, 2024 19:55
pages/_app.tsx Outdated
Comment on lines 40 to 44
useEffect(() => {
setInitialRenderComplete(true);
}, []);

if (!initialRenderComplete) return <></>;
Copy link
Member

Choose a reason for hiding this comment

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

Why this change @NateWilliams2? 🤔

Copy link
Contributor Author

@NateWilliams2 NateWilliams2 May 28, 2024

Choose a reason for hiding this comment

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

@elboletaire This change fixed a hydration error I was getting on loading the site:

Unhandled Runtime Error
Error: Hydration failed because the initial UI does not match what was rendered on the server.

I found this solution here: https://dev.to/ranjittherapids/troubleshooting-hydration-failed-error-in-nextjs-or-react-app-47fe

Copy link
Member

Choose a reason for hiding this comment

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

I think we have a dependency problem here. I'm not sure we should be using react-i18next at all, but next-i18next instead: https://github.com/i18next/next-i18next?tab=readme-ov-file#why-next-i18next

@elboletaire
Copy link
Member

Super-seeded by the new explorer https://github.com/vocdoni/explorer

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants