// Password Confirmation Dialog // Purpose: Collects recent password proof for sensitive administrative mutations without storing it in page state longer than necessary. // Scope: Handles confirmation presentation only; retry ownership remains in AdminApp. import { useState } from 'react'; export default function PasswordConfirmationDialog({ open, busy, error, onCancel, onConfirm }) { const [password, setPassword] = useState(''); if (!open) return null; async function submit(event) { event.preventDefault(); await onConfirm(password); setPassword(''); } function cancel() { // Clear the credential before closing because this component remains // mounted beneath the admin shell and would otherwise retain it in memory. setPassword(''); onCancel(); } return (

Confirm password

This sensitive action requires recent confirmation of your administrator password.

setPassword(event.target.value)} /> {error ?

{error}

: null}
); }