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

bugfix: locale switch #331

Merged
merged 4 commits into from
Sep 16, 2021
Merged

bugfix: locale switch #331

merged 4 commits into from
Sep 16, 2021

Conversation

stringparser
Copy link
Contributor

@stringparser stringparser commented Sep 15, 2021

Fixes #326 (rework).

A better fix than what it was done in #327. Could test now in localhost by adding a condition on pages/checkin for development to not redirect. See below.

To test locally you can use this URL:

http://localhost:3000/checkin?a=4e8f4906-ce9d-4590-9d4e-6df5a2939d39&k=VCW%2FKvtAiZ8mwTtMLHRJkSIgn%2FnLKvMZ9XwfXyzBvko%3D

@stringparser stringparser self-assigned this Sep 15, 2021
@stringparser stringparser added the bug Something isn't working label Sep 15, 2021
persistLocale(locale)

setTimeout(() => router.reload(), 300)
Copy link
Contributor Author

@stringparser stringparser Sep 15, 2021

Choose a reason for hiding this comment

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

It seems we do have to reload a page when changing the locale. Somehow client side there are some issues with state for useQuery. Or at least that is true for /checkin. The result of useArea is empty and this is why the bug here happens.

Couldn't find out why the query has no data but after reload it was all good.

@stringparser stringparser merged commit c293033 into master Sep 16, 2021
@stringparser stringparser deleted the bugfix/checkin-language-switch branch September 16, 2021 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

checkin page translation
2 participants