import { useEffect, FormEventHandler } from 'react'
import GuestLayout from '@/Layouts/GuestLayout'
import InputError from '@/Components/InputError'
import InputLabel from '@/Components/InputLabel'
import PrimaryButton from '@/Components/PrimaryButton'
import TextInput from '@/Components/TextInput'
import { Head, Link, useForm } from '@inertiajs/react'
import { login_path, register_path } from '@/routes'
export default function Register() {
const { data, setData, post, processing, errors, reset } = useForm({
name: '',
email: '',
password: '',
password_confirmation: '',
})
useEffect(() => {
return () => {
reset('password', 'password_confirmation')
}
}, [])
const submit: FormEventHandler = (e) => {
e.preventDefault()
post(register_path())
}
return (