import React from "react"; import { useNavigate } from "react-router-dom"; import { Mail, InfoIcon, RefreshCw } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; interface EmailConfirmationProps { email: string; onBackToForm: () => void; onResendEmail?: () => Promise; } const EmailConfirmation: React.FC = ({ email, onBackToForm, onResendEmail }) => { const navigate = useNavigate(); const [isResending, setIsResending] = useState(false); // 이메일 재전송 핸들러 const handleResendEmail = async () => { if (!onResendEmail) return; setIsResending(true); try { await onResendEmail(); // 성공 메시지는 onResendEmail 내부에서 표시 } catch (error) { console.error('이메일 재전송 오류:', error); } finally { setIsResending(false); } }; return (

이메일 인증이 필요합니다

{email}로 인증 링크가 포함된 이메일을 보냈습니다. 이메일을 확인하고 링크를 클릭하여 계정 등록을 완료해주세요.

인증 이메일이 보이지 않나요? 스팸 폴더를 확인해보세요. 또한 이메일 서비스에 따라 도착하는데 몇 분이 걸릴 수 있습니다. {onResendEmail && (
아직도 받지 못했다면 아래 '인증 메일 재전송' 버튼을 클릭하세요.
)}
{onResendEmail && ( )}
); }; export default EmailConfirmation;