@@ -2,53 +2,76 @@ import AuthInput from "@/components/Auth/AuthInput";
22import SubmitButton from "@/components/SubMitButton" ;
33import AuthLayout from "@/components/Layout/AuthLayout" ;
44import Link from "next/link" ;
5+ import useForm from "@/hooks/useForm" ;
6+
7+ const SignupPage = ( ) => {
8+ const { values, errors, handleChange, handleBlur, handleSubmit } =
9+ useForm ( true ) ;
510
6- const signup = ( ) => {
711 return (
8- < AuthLayout >
9- < p className = "mt-[16px] text-base font-normal" >
10- 이미 회원이신가요?{ " " }
11- < Link
12- href = "/login"
13- className = "cursor-pointer text-purple100 underline font-semibold"
12+ < div className = "bg-gray100 min-h-screen" >
13+ < AuthLayout >
14+ < p className = "mt-[16px] text-base font-normal" >
15+ 이미 회원이신가요?{ " " }
16+ < Link
17+ href = "/login"
18+ className = "cursor-pointer text-purple100 underline font-semibold"
19+ >
20+ 로그인하기
21+ </ Link >
22+ </ p >
23+ < form
24+ className = "w-full sm:max-w-[325px] md:max-w-[400px] lg:max-w-[400px] mt-[30px] h-full"
25+ aria-labelledby = "login-form"
26+ onSubmit = { handleSubmit }
1427 >
15- 로그인하기
16- </ Link >
17- </ p >
18- < form
19- className = "w-full sm:max-w-[325px] md:max-w-[400px] lg:max-w-[400px] mt-[30px]"
20- aria-labelledby = "login-form"
21- >
22- < AuthInput
23- text = "이메일"
24- type = "text"
25- name = "email"
26- placeholder = "이메일을 입력해주세요."
27- />
28- < AuthInput
29- text = "이름"
30- type = "text"
31- name = "nickname"
32- placeholder = "이름을 입력해주세요."
33- />
34- < AuthInput
35- text = "비밀번호"
36- type = "password"
37- name = "password"
38- placeholder = "비밀번호를 입력해주세요."
39- />
40- < AuthInput
41- text = "비밀번호 확인"
42- type = "password"
43- name = "passwordConfirm"
44- placeholder = "비밀번호를 다시 입력해주세요."
45- />
46- < SubmitButton width = "w-full" height = "h-[53px]" className = "mt-[30px]" >
47- 회원가입
48- </ SubmitButton >
49- </ form >
50- </ AuthLayout >
28+ < AuthInput
29+ text = "이메일"
30+ type = "text"
31+ name = "email"
32+ placeholder = "이메일을 입력해주세요."
33+ value = { values . email }
34+ onChange = { handleChange }
35+ onBlur = { handleBlur }
36+ error = { errors . email }
37+ />
38+ < AuthInput
39+ text = "이름"
40+ type = "text"
41+ name = "nickname"
42+ placeholder = "이름을 입력해주세요."
43+ value = { values . nickname }
44+ onChange = { handleChange }
45+ onBlur = { handleBlur }
46+ error = { errors . nickname }
47+ />
48+ < AuthInput
49+ text = "비밀번호"
50+ type = "password"
51+ name = "password"
52+ placeholder = "비밀번호를 입력해주세요."
53+ value = { values . password }
54+ onChange = { handleChange }
55+ onBlur = { handleBlur }
56+ error = { errors . password }
57+ />
58+ < AuthInput
59+ text = "비밀번호"
60+ type = "password"
61+ name = "passwordConfirm"
62+ placeholder = "비밀번호를 입력해주세요."
63+ value = { values . passwordConfirm }
64+ onChange = { handleChange }
65+ onBlur = { handleBlur }
66+ error = { errors . passwordConfirm }
67+ />
68+ < SubmitButton width = "w-full" height = "h-[53px]" className = "mt-[30px]" >
69+ 회원가입
70+ </ SubmitButton >
71+ </ form >
72+ </ AuthLayout >
73+ </ div >
5174 ) ;
5275} ;
5376
54- export default signup ;
77+ export default SignupPage ;
0 commit comments