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, useForm } from '@inertiajs/react' import { password_store_path } from '@/routes' export default function ResetPassword({ token }: { token: string }) { const { data, setData, post, processing, errors, reset } = useForm({ token: token, password: '', password_confirmation: '', }) useEffect(() => { return () => { reset('password', 'password_confirmation') } }, []) const submit: FormEventHandler = (e) => { e.preventDefault() post(password_store_path()) } return (
setData('password', e.target.value)} />
setData('password_confirmation', e.target.value)} />
Reset Password
) }