Skip to content

Commit

Permalink
Formatting: #35 로그인 페이지의 email 필드를 id 필드로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoonyesol committed Jul 20, 2024
1 parent 9f75700 commit e5d334a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/pages/user/SignInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function SignInPage() {
} = useForm({
mode: 'onChange',
defaultValues: {
email: '',
id: '',
password: '',
},
});
Expand All @@ -27,11 +27,11 @@ export default function SignInPage() {
return (
<AuthForm onSubmit={handleSubmit(onSubmit)}>
<section className="auth-form-section">
{/* 이메일(아이디) */}
{/* 아이디 */}
<ValidationInput
placeholder="이메일"
errors={errors.email?.message}
register={register('email', STATUS_VALIDATION_RULES.EMAIL())}
placeholder="아이디"
errors={errors.id?.message}
register={register('id', STATUS_VALIDATION_RULES.ID())}
/>

{/* 비밀번호 */}
Expand Down
1 change: 1 addition & 0 deletions src/pages/user/SignUpPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default function SignUpPage() {
} = useForm<UserSignUp>({
mode: 'onChange',
defaultValues: {
id: '',
image: [], // 추후 이미지 전송 폼 분리 예정
email: '',
emailVerificationCode: '',
Expand Down
3 changes: 2 additions & 1 deletion src/types/UserType.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// 회원가입, 로그인 시 필요한 유저 타입 정의
export type UserSignInForm = {
email: string;
id: string;
password: string;
};

export type UserSignUpForm = UserSignInForm & {
email: string;
image: File[];
password: string;
nickname: string;
Expand Down

0 comments on commit e5d334a

Please sign in to comment.