Refactor RegisterForm component
Splits the RegisterForm component into smaller, more manageable components to improve code readability and maintainability.
This commit is contained in:
55
src/components/auth/EmailConfirmation.tsx
Normal file
55
src/components/auth/EmailConfirmation.tsx
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
import React from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Mail, InfoIcon } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
||||
|
||||
interface EmailConfirmationProps {
|
||||
email: string;
|
||||
onBackToForm: () => void;
|
||||
}
|
||||
|
||||
const EmailConfirmation: React.FC<EmailConfirmationProps> = ({ email, onBackToForm }) => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<div className="neuro-flat p-8 mb-6">
|
||||
<div className="text-center space-y-6">
|
||||
<Mail className="w-16 h-16 mx-auto text-neuro-income" />
|
||||
<h2 className="text-2xl font-bold">이메일 인증이 필요합니다</h2>
|
||||
<p className="text-gray-600">
|
||||
<strong>{email}</strong>로 인증 링크가 포함된 이메일을 보냈습니다.
|
||||
이메일을 확인하고 링크를 클릭하여 계정 등록을 완료해주세요.
|
||||
</p>
|
||||
|
||||
<Alert className="bg-blue-50 border-blue-200 my-6">
|
||||
<InfoIcon className="h-5 w-5 text-blue-600" />
|
||||
<AlertTitle className="text-blue-700">인증 이메일이 보이지 않나요?</AlertTitle>
|
||||
<AlertDescription className="text-blue-600">
|
||||
스팸 폴더를 확인해보세요. 또는 다른 이메일 주소로 다시 시도하실 수 있습니다.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
|
||||
<div className="space-y-4 pt-4">
|
||||
<Button
|
||||
onClick={() => navigate("/login")}
|
||||
variant="outline"
|
||||
className="w-full"
|
||||
>
|
||||
로그인 페이지로 이동
|
||||
</Button>
|
||||
<Button
|
||||
onClick={onBackToForm}
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
>
|
||||
회원가입 양식으로 돌아가기
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default EmailConfirmation;
|
||||
Reference in New Issue
Block a user