'use client';

import { useClientOnce } from '@/hooks/telegram';
import { isTMA } from '@telegram-apps/sdk-react';
import { redirect } from 'next/navigation';

export default function Page() {
  useClientOnce(() => {
    const isTG = isTMA('simple');

    redirect(isTG ? '/telegram' : '/browser');
  });
}
