'use client' import { useState, useEffect } from 'react' export default function DeleteAccountModal({ isOpen, onClose, }: { isOpen: boolean onClose: () => void }) { const [isLoading, setIsLoading] = useState(false) const [step, setStep] = useState(1) const [confirmText, setConfirmText] = useState('') useEffect(() => { if (isOpen) { setStep(1) setConfirmText('') setIsLoading(false) } }, [isOpen]) if (!isOpen) return null return (

Delete Account

{step === 1 ? ( <>

Are you sure you want to delete your account? This action cannot be undone. Your data will be permanently removed.

) : ( <>

To confirm deletion, please type DELETE below.

setConfirmText(e.target.value)} placeholder="Type DELETE" className="w-full bg-gray-900 border border-gray-700 rounded-lg px-3 py-2 text-white mb-6 focus:outline-none focus:border-red-500 transition-colors" autoFocus />
setIsLoading(true)} >
)}
) }