-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix getting and setting the locale via useLocale hook
Change the LocaleObserver to not store the locale locally and instead always rely on useLocale. This means useLocale is the new source of truth for the current active locale for the whole application. Therefore ensure that useLocale returns the applied locale. Either fromi the store when the user is logged in or as a fallback directly from i18n when the user is not logged in or the locale has not been dispatched to the store yet.
- Loading branch information
1 parent
828105c
commit 5f05eb5
Showing
3 changed files
with
42 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters