Skip to content

Commit 6002c2d

Browse files
committed
refactor: update defaultLocale for page after route changed
1 parent 1fae22a commit 6002c2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/components/Locales/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function Locales() {
2424

2525
useEffect(() => {
2626
if (typeof window === 'undefined') return;
27-
const local = window.localStorage.getItem('locale');
27+
const local = defaultLocale || window.localStorage.getItem('locale');
2828
if (local && i18n[local]) {
2929
changeLocale(local);
3030
}

0 commit comments

Comments
 (0)