import { Form, useSubmit } from '@remix-run/react' import { type Dispatch, type SetStateAction } from 'react' import Dialog from '~/components/Dialog' import { type Machine } from '~/types' import { cn } from '~/utils/cn' interface DeleteProps { readonly machine: Machine readonly state: [boolean, Dispatch>] } export default function Delete({ machine, state }: DeleteProps) { const submit = useSubmit() return ( {close => ( <> Remove {' '} {machine.givenName} This machine will be permanently removed from your network. To re-add it, you will need to reauthenticate to your tailnet from the device.
{ submit(e.currentTarget) }} >
Cancel Remove
)}
) }