linter fixes

This commit is contained in:
2025-05-27 15:07:33 +03:00
parent b30796ae4b
commit 85349bf961
16 changed files with 991 additions and 1295 deletions

View File

@@ -5,27 +5,35 @@ import Link from 'next/link'
import { useRouter } from 'next/navigation'
import useUserStore from '@/app/store/userStore'
import ClientRegistrationForm from './components/ClientRegistrationForm'
import Loader from '@/components/ui/Loader'
const RegisterPage = () => {
const router = useRouter()
const { isAuthenticated } = useUserStore()
const [isClient, setIsClient] = useState(true)
const [isLoading, setIsLoading] = useState(true)
useEffect(() => {
// проверяем логин
if (isAuthenticated) {
// распределяем
if (isClient) {
router.replace('/account')
}
router.replace('/account')
return
}
}, [isAuthenticated, router, isClient])
const timer = setTimeout(() => {
setIsLoading(false)
}, 300)
return () => clearTimeout(timer)
}, [isAuthenticated, router])
if (isLoading) {
return <Loader />
}
return (
<div className="flex items-center justify-center p-12">
<div className="flex w-full max-w-xl md:max-w-3xl lg:max-w-3xl flex-col gap-4 bg-white rounded-2xl shadow-lg p-6">
<h1 className="text-2xl py-1">Давайте познакомимся поближе!</h1>
<div className="flex w-full max-w-xl flex-col gap-4 rounded-2xl bg-white p-6 shadow-lg md:max-w-3xl lg:max-w-3xl">
<h1 className="py-1 text-2xl">Давайте познакомимся поближе!</h1>
<ClientRegistrationForm />