'use client'; import { useState } from 'react'; import { rollbackAction } from '@/lib/admin/actions'; import { ActionButton } from './ui'; /** * Rollback with confirmation: the operator must repeat the run id (works without JS through the same form; with JS the * field appears inline). The server action refuses when the confirmation does not match. */ export function RollbackButton({ runId, connector, returnTo, disabled }: { runId: string; connector: string; returnTo: string; disabled?: boolean }) { const [open, setOpen] = useState(false); const [typed, setTyped] = useState(''); if (!open) return ( ); return (
Confirm rollback
); }