import { Form, useSubmit } from 'react-router'; import type { Dispatch, SetStateAction } from 'react'; import Dialog from '~/components/Dialog'; import type { Machine } from '~/types'; import { cn } from '~/utils/cn'; interface ExpireProps { readonly machine: Machine; readonly state: [boolean, Dispatch>]; } export default function Expire({ machine, state }: ExpireProps) { const submit = useSubmit(); return ( {(close) => ( <> Expire {machine.givenName} This will disconnect the machine from your Tailnet. In order to reconnect, you will need to re-authenticate from the device.
{ submit(e.currentTarget); }} >
Cancel Expire
)}
); }