import { useQuery } from '@tanstack/react-query';
import { Send } from 'lucide-react';
import { api, type Me } from '../api.ts';
import { PageTitle } from '../components/ui.tsx';
import { TelegramLink } from '../pages/Settings.tsx';
import { useAcc } from './i18n.ts';
/** Тариф без веб-кабинета, открыт браузер: объясняем, что работа идёт в Telegram, и помогаем туда попасть. */
export function TelegramOnlyPage({ me }: { me: Me }) {
const { a } = useAcc();
const m = a.mini;
const { data } = useQuery({
queryKey: ['config'],
queryFn: () => api<{ telegramBotUsername: string | null }>('/config'),
staleTime: Infinity,
});
const bot = data?.telegramBotUsername;
return (
<>
1{m.step1}
2{m.step2}
{bot && ( {m.open} )}{m.upgrade}
> ); }