import { useForm , Head } from '@inertiajs/inertia-react' ; import classNames from 'classnames' ; import React from 'react' ; import useRoute from '@/Hooks/useRoute' ; import JetAuthenticationCard from '@/Jetstream/AuthenticationCard' ; import JetButton from '@/Jetstream/Button' ; import JetInput from '@/Jetstream/Input' ; import JetLabel from '@/Jetstream/Label' ; import JetValidationErrors from '@/Jetstream/ValidationErrors' ; interface Props { status : string ; } export default function ForgotPassword ( { status } ) { const route = useRoute ( ) ; const form = useForm ( { email : '' , } ) ; function onSubmit ( e ) { e . preventDefault ( ) ; form . post ( route ( 'password.email' ) ) ; } return ( < JetAuthenticationCard > < Head title = "Forgot Password" / > < div className = "mb-4 text-sm text-gray-600" > Forgot your password ? No problem . Just let us know your email address and we will email you a password reset link that will allow you to choose a new one . < /div> { status && ( < div className = "mb-4 font-medium text-sm text-green-600" > { status } < /div>)} < JetValidationErrors className = "mb-4" / > < form onSubmit = { onSubmit } > < div > < JetLabel htmlFor = "email" > Email < /JetLabel> < JetInput id = "email" type = "email" className = "mt-1 block w-full" value = { form . data . email } onChange = { e => form . setData ( 'email' , e . currentTarget . value ) } required autoFocus / > < /div> < div className = "flex items-center justify-end mt-4" > < JetButton className = { classNames ( { 'opacity-25' : form . processing } ) } disabled = { form . processing } > Email Password Reset Link < /JetButton> < /div> < /form> < /JetAuthenticationCard>); }