* add basic profile page * apps/web: detect telegram/browser support browser (dev only) * apps/web: add dark mode * apps/web: support dark theme in tma * apps/web: add loading spinner remove dev info from page * apps\web\app\(auth)\page.tsx: remove useState * app/web: handle update profile name * move debounce functional to hook * add role checkbox
13 lines
306 B
TypeScript
13 lines
306 B
TypeScript
'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');
|
|
});
|
|
}
|