fix: preserve query params in i18n URL, make seed phrase copyable in bot

This commit is contained in:
2026-02-14 21:08:28 +03:00
parent b8ab86028f
commit 59d4f3e6a1
4 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -139,10 +139,10 @@ export function LanguageProvider({ children }: LanguageProviderProps) {
document.documentElement.lang = lang === 'krd' ? 'ku' : lang;
document.documentElement.dir = isRTL ? 'rtl' : 'ltr';
// Ensure URL has language prefix
// Ensure URL has language prefix (preserve query params like ?page=citizen)
const firstSegment = window.location.pathname.split('/').filter(Boolean)[0];
if (!firstSegment || !VALID_LANGS.includes(firstSegment as LanguageCode)) {
window.history.replaceState(null, '', `/${lang}`);
window.history.replaceState(null, '', `/${lang}${window.location.search}`);
}
}, [lang, isRTL]);
@@ -156,7 +156,7 @@ export function LanguageProvider({ children }: LanguageProviderProps) {
segments.shift();
}
const newPath = `/${newLang}${segments.length > 0 ? '/' + segments.join('/') : ''}`;
window.history.replaceState(null, '', newPath);
window.history.replaceState(null, '', `${newPath}${window.location.search}`);
}, []);
const t = useCallback(
+3 -3
View File
@@ -1,5 +1,5 @@
{
"version": "1.0.192",
"buildTime": "2026-02-14T17:44:17.743Z",
"buildNumber": 1771091057743
"version": "1.0.193",
"buildTime": "2026-02-14T18:08:28.138Z",
"buildNumber": 1771092508139
}