import React, { useEffect } 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/inertia-react'; import ApplicationLogo from '@/Components/ApplicationLogo'; export default function Login({ status, canResetPassword }) { const { data, setData, post, processing, errors, reset } = useForm({ email: '', password: '', remember: '', }); useEffect(() => { return () => { reset('password'); }; }, []); const onHandleChange = (event) => { setData(event.target.name, event.target.type === 'checkbox' ? event.target.checked : event.target.value); }; const submit = (e) => { e.preventDefault(); post(route('login')); }; return (
{status &&
{status}
}
Log in
); }