import React, { useState } from "react"; import { Link } from "react-router-dom"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; import { ArrowLeft, Mail, ArrowRight } from "lucide-react"; import { useAuth } from "@/contexts/auth"; const ForgotPassword = () => { const [email, setEmail] = useState(""); const [isLoading, setIsLoading] = useState(false); const [isSent, setIsSent] = useState(false); const { resetPassword } = useAuth(); const handleResetPassword = async (e: React.FormEvent) => { e.preventDefault(); if (!email) { return; } setIsLoading(true); try { const { error } = await resetPassword(email); if (!error) { setIsSent(true); } } finally { setIsLoading(false); } }; return (

비밀번호 재설정

{isSent ? "이메일을 확인하여 비밀번호를 재설정하세요" : "가입한 이메일 주소를 입력하세요"}

{!isSent ? (
setEmail(e.target.value)} className="pl-10 neuro-pressed" />
) : (

비밀번호 재설정 링크가 {email}로 전송되었습니다.

이메일을 확인하여 링크를 클릭하세요. 이메일이 보이지 않는다면 스팸함도 확인해주세요.

)}
로그인으로 돌아가기
); }; export default ForgotPassword;