refactor: 인증 페이지를 React Hook Form 컴포넌트로 마이그레이션
- signup/page.tsx: SignupForm 컴포넌트 사용 - login/page.tsx: LoginForm 컴포넌트 사용 - reset-password/page.tsx: ResetPasswordForm 컴포넌트 사용 - auth/callback/route.ts: 불필요한 주석 제거
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import FormMessage from "@/components/form-message";
|
||||
import { updatePassword } from "@/features/auth/actions";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import ResetPasswordForm from "@/features/auth/components/reset-password-form";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
@@ -105,38 +102,7 @@ export default async function ResetPasswordPage({
|
||||
|
||||
{/* ========== 폼 영역 ========== */}
|
||||
<CardContent className="space-y-6">
|
||||
{/* 비밀번호 업데이트 폼 */}
|
||||
<form className="space-y-5">
|
||||
{/* ========== 새 비밀번호 입력 ========== */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="password" className="text-sm font-medium">
|
||||
새 비밀번호
|
||||
</Label>
|
||||
<Input
|
||||
id="password"
|
||||
name="password"
|
||||
type="password"
|
||||
placeholder="••••••••"
|
||||
autoComplete="new-password"
|
||||
required
|
||||
minLength={8}
|
||||
pattern="^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[!@#$%^&*]).{8,}$"
|
||||
title="비밀번호는 최소 8자 이상, 대문자, 소문자, 숫자, 특수문자를 각각 1개 이상 포함해야 합니다."
|
||||
className="h-11 transition-all duration-200"
|
||||
/>
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400">
|
||||
최소 8자 이상, 대문자, 소문자, 숫자, 특수문자 포함
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* ========== 비밀번호 변경 버튼 ========== */}
|
||||
<Button
|
||||
formAction={updatePassword}
|
||||
className="h-11 w-full bg-gradient-to-r from-gray-900 to-black font-semibold text-white shadow-lg transition-all hover:from-black hover:to-gray-800 hover:shadow-xl dark:from-white dark:to-gray-100 dark:text-black dark:hover:from-gray-100 dark:hover:to-white"
|
||||
>
|
||||
비밀번호 변경
|
||||
</Button>
|
||||
</form>
|
||||
<ResetPasswordForm />
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user