import { useEffect, FormEventHandler } from 'react'
import Checkbox from '@/Components/Checkbox'
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, password_request_path } from '@/routes'
export default function Login({ status }: { status?: string }) {
const { data, setData, post, processing, errors, reset } = useForm({
email: '',
password: '',
remember: false,
})
useEffect(() => {
return () => {
reset('password')
}
}, [])
const submit: FormEventHandler = (e) => {
e.preventDefault()
post(login_path())
}
return (