import InputError from '@/Components/InputError'; import { Transition } from '@headlessui/react'; import { Link, useForm, usePage } from '@inertiajs/react'; import { FormEventHandler } from 'react'; import { Button } from '@/Components/ui/button'; import { Input } from '@/Components/ui/input'; import { Label } from '@/Components/ui/label'; export default function UpdateProfileInformation({ mustVerifyEmail, status, className = '', }: { mustVerifyEmail: boolean; status?: string; className?: string; }) { const user = usePage().props.auth.user; const { data, setData, patch, errors, processing, recentlySuccessful } = useForm({ name: user.name, email: user.email, }); const submit: FormEventHandler = (e) => { e.preventDefault(); patch(route('profile.update')); }; return (

Profile Information

Update your account's profile information and email address.

setData('name', e.target.value)} required autoComplete="name" className="block w-full" />
setData('email', e.target.value)} required autoComplete="username" className="block w-full" />
{mustVerifyEmail && user.email_verified_at === null && (

Your email address is unverified. Click here to re-send the verification email.

{status === 'verification-link-sent' && (
A new verification link has been sent to your email address.
)}
)}

Saved.

); }