You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.8 KiB
����������
55 lines
1.8 KiB
����������
import React from 'react';
|
|
import GuestLayout from '@/Layouts/GuestLayout';
|
|
import InputError from '@/Components/InputError';
|
|
import PrimaryButton from '@/Components/PrimaryButton';
|
|
import TextInput from '@/Components/TextInput';
|
|
import { Head, useForm } from '@inertiajs/react';
|
|
|
|
export default function ForgotPassword({ status }) {
|
|
const { data, setData, post, processing, errors } = useForm({
|
|
email: '',
|
|
});
|
|
|
|
const onHandleChange = (event) => {
|
|
setData(event.target.name, event.target.value);
|
|
};
|
|
|
|
const submit = (e) => {
|
|
e.preventDefault();
|
|
|
|
post(route('password.email'));
|
|
};
|
|
|
|
return (
|
|
<GuestLayout>
|
|
<Head title="Forgot Password" />
|
|
|
|
<div className="mb-4 text-sm text-gray-500 leading-normal">
|
|
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>}
|
|
|
|
<form onSubmit={submit}>
|
|
<TextInput
|
|
type="text"
|
|
name="email"
|
|
value={data.email}
|
|
className="mt-1 block w-full"
|
|
isFocused={true}
|
|
handleChange={onHandleChange}
|
|
/>
|
|
|
|
<InputError message={errors.email} className="mt-2" />
|
|
|
|
<div className="flex items-center justify-end mt-4">
|
|
<PrimaryButton className="ml-4" processing={processing}>
|
|
Email Password Reset Link
|
|
</PrimaryButton>
|
|
</div>
|
|
</form>
|
|
</GuestLayout>
|
|
);
|
|
}
|