import ApplicationLogo from '@/components/ApplicationLogo' import AuthCard from '@/components/AuthCard' import AuthValidationErrors from '@/components/AuthValidationErrors' import Button from '@/components/Button' import GuestLayout from '@/components/Layouts/GuestLayout' import Input from '@/components/Input' import Label from '@/components/Label' import Link from 'next/link' import { useAuth } from '@/hooks/auth' import { useState } from 'react' const Register = () => { const { register } = useAuth({ middleware: 'guest', redirectIfAuthenticated: '/dashboard', }) const [name, setName] = useState('') const [email, setEmail] = useState('') const [password, setPassword] = useState('') const [password_confirmation, setPasswordConfirmation] = useState('') const [errors, setErrors] = useState([]) const submitForm = event => { event.preventDefault() register({ name, email, password, password_confirmation, setErrors }) } return ( }> {/* Validation Errors */}
{/* Name */}
setName(event.target.value)} required autoFocus />
{/* Email Address */}
setEmail(event.target.value)} required />
{/* Password */}
setPassword(event.target.value)} required autoComplete="new-password" />
{/* Confirm Password */}
setPasswordConfirmation(event.target.value) } required />
Already registered?
) } export default Register