Уже есть аккаунт?{' '} Войти
'use client'; import { useEffect } from 'react'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import { RegisterForm } from '@/components/auth'; import { useAuth } from '@/lib/contexts/AuthContext'; export default function RegisterPage() { const router = useRouter(); const { isAuthenticated, isLoading } = useAuth(); useEffect(() => { if (!isLoading && isAuthenticated) { router.push('/'); } }, [isAuthenticated, isLoading, router]); if (isLoading) { return (
Уже есть аккаунт?{' '} Войти