mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-06-14 18:01:09 +00:00
fix: preserve query params in i18n URL, make seed phrase copyable in bot
This commit is contained in:
+3
-3
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user