import InputError from '@/Components/InputError' import InputLabel from '@/Components/InputLabel' import PrimaryButton from '@/Components/PrimaryButton' import TextInput from '@/Components/TextInput' import { useForm, usePage } from '@inertiajs/react' import { Transition } from '@headlessui/react' import { FormEventHandler } from 'react' import { PageProps } from '@/types' import { profile_update_path } from '@/routes' export default function UpdateProfileInformation({ className = '', }: { 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(profile_update_path()) } return (

Profile Information

Update your account's profile information and email address.

setData('name', e.target.value)} required isFocused autoComplete="name" />
setData('email', e.target.value)} required autoComplete="username" />
Save

Saved.

) }