import { Button } from '@affine/admin/components/ui/button'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '@affine/admin/components/ui/dialog'; import { Input } from '@affine/admin/components/ui/input'; import { useCallback, useEffect, useState } from 'react'; export const DeleteAccountDialog = ({ email, open, onClose, onDelete, onOpenChange, }: { email: string; open: boolean; onClose: () => void; onDelete: () => void; onOpenChange: (open: boolean) => void; }) => { const [input, setInput] = useState(''); const handleInput = useCallback( (event: React.ChangeEvent) => { setInput(event.target.value); }, [setInput] ); useEffect(() => { if (!open) { setInput(''); } }, [open]); return ( Delete Account ? {email} will be permanently deleted. This operation is irreversible. Please proceed with caution.
); };