import React, { useEffect } from 'react'
import GuestLayout from '@/Layouts/GuestLayout'
import InputError from '@/Components/Defaults/InputError'
import InputLabel from '@/Components/Defaults/InputLabel'
import PrimaryButton from '@/Components/Defaults/PrimaryButton'
import TextInput from '@/Components/Defaults/TextInput'
import { Head, Link, useForm } from '@inertiajs/react'
export default function Register() {
const { data, setData, post, processing, errors, reset } = useForm({
name: '',
email: '',
password: '',
password_confirmation: '',
})
useEffect(() => {
return () => {
reset('password', 'password_confirmation')
}
}, [])
const onHandleChange = (event) => {
setData(
event.target.name,
event.target.type === 'checkbox'
? event.target.checked
: event.target.value
)
}
const submit = (e) => {
e.preventDefault()
post(route('register'))
}
return (