import React from 'react'; import GuestLayout from '@/Layouts/GuestLayout'; import { Head, useForm } from '@inertiajs/react'; interface ResetPasswordProps { token: string; email: string; } export default function ResetPassword({ token, email }: ResetPasswordProps) { const { data, setData, post, processing, errors, reset } = useForm({ token, email, password: '', password_confirmation: '', }); const submit = (e: React.FormEvent) => { e.preventDefault(); post(route('password.store'), { onFinish: () => reset('password', 'password_confirmation') }); }; return (

Set new password

Choose a strong password for {email}.

{/* Email readonly — needed for form submission, not shown */}
setData('password', e.target.value)} placeholder="Min. 8 characters" className={`auth-input${errors.password ? ' !border-red-300 !bg-red-50/50' : ''}`} /> {errors.password &&

{errors.password}

}
setData('password_confirmation', e.target.value)} placeholder="••••••••" className={`auth-input${errors.password_confirmation ? ' !border-red-300 !bg-red-50/50' : ''}`} /> {errors.password_confirmation &&

{errors.password_confirmation}

}
); }