fix build

This commit is contained in:
vchikalkin 2025-10-14 15:23:13 +03:00
parent b5813e3b53
commit 7560b1702f
3 changed files with 1 additions and 22 deletions

View File

@ -2,10 +2,8 @@
'use client';
import { useBackButton, useClientOnce, useDidMount, useViewport } from '@/hooks/telegram';
import { setLocale } from '@/utils/i18n/locale';
import { init } from '@/utils/telegram/init';
import { initData, useSignal } from '@telegram-apps/sdk-react';
import { type PropsWithChildren, useEffect } from 'react';
import { type PropsWithChildren } from 'react';
export function TelegramProvider(props: Readonly<PropsWithChildren>) {
// Unfortunately, Telegram Mini Apps does not allow us to use all features of
@ -31,12 +29,5 @@ function RootInner({ children }: PropsWithChildren) {
useViewport();
useBackButton();
const initDataUser = useSignal(initData.user);
// Set the user locale.
useEffect(() => {
if (initDataUser) setLocale(initDataUser.languageCode);
}, [initDataUser]);
return children;
}

View File

@ -1,6 +0,0 @@
{
"i18n": {
"header": "Application supports i18n",
"footer": "You can select a different language from the dropdown menu."
}
}

View File

@ -1,6 +0,0 @@
{
"i18n": {
"header": "Поддержка i18n",
"footer": "Вы можете выбрать другой язык в выпадающем меню."
}
}