diff --git a/apps/web/app/(auth)/telegram/page.tsx b/apps/web/app/(auth)/telegram/page.tsx index 3ac0030..3b60042 100644 --- a/apps/web/app/(auth)/telegram/page.tsx +++ b/apps/web/app/(auth)/telegram/page.tsx @@ -1,4 +1,5 @@ 'use client'; +import { updateProfile } from '@/actions/profile'; import { LoadingSpinner } from '@repo/ui/components/ui/spinner'; import { initData, isMiniAppDark, useSignal } from '@telegram-apps/sdk-react'; import { signIn, useSession } from 'next-auth/react'; @@ -15,6 +16,8 @@ export default function Auth() { useEffect(() => { setTheme(isDark ? 'dark' : 'light'); + if (initDataUser?.photoUrl) updateProfile({ photoUrl: initDataUser?.photoUrl }); + if (status === 'authenticated') { redirect('/profile'); }