import { useForm } from '@inertiajs/react'; import { route } from '@izzyjs/route/client'; import { useTranslation } from 'react-i18next'; import { FormCollection, FormCollectionData, } from '~/components/form/form_collection'; import { Collection } from '~/types/app'; export default function DeleteCollectionPage({ collection, }: { collection: Collection; }) { const { t } = useTranslation('common'); const { data, setData, submit, processing, errors } = useForm({ name: collection.name, description: collection.description, visibility: collection.visibility, }); const handleSubmit = () => { const { method, url } = route('collection.delete', { params: { id: collection.id.toString() }, }); submit(method, url); }; return ( ); }