import { Transition } from '@headlessui/react'; import { Form, Head } from '@inertiajs/react'; import { useRef } from 'react'; import PasswordController from '@/actions/App/Http/Controllers/Settings/PasswordController'; import { HeadingSmall } from '@/common/HeadingSmall'; import { InputError } from '@/common/InputError'; import { type BreadcrumbItem } from '@/common/types'; import AppLayout from '@/pages/layouts/AppLayout'; import SettingsLayout from '@/pages/layouts/settings/layout'; import { edit } from '@/routes/password'; import { Button } from '@/shadcn/button'; import { Input } from '@/shadcn/input'; import { Label } from '@/shadcn/label'; const breadcrumbs: BreadcrumbItem[] = [ { title: 'Password settings', href: edit().url, }, ]; export default function PasswordPage() { const passwordInput = useRef(null); const currentPasswordInput = useRef(null); return (
{ if (errors.password) { passwordInput.current?.focus(); } if (errors.current_password) { currentPasswordInput.current?.focus(); } }} className="space-y-6" > {({ errors, processing, recentlySuccessful }) => ( <>

Saved

)}
); }