-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Provider폴더 추가 * feat: useLocalStorage 훅 추가 * feat: 이메일 유효성 검사 Blur시 처리 * feat: index.ts 폴더 추가 * refactor: defaultValue 선택으로 받도록 수정 * feat: 유효성 에러 나타내는 컴포넌트 추가 * feat: 유효한 이메일 형식이 아닌 경우 disabled처리 * refactor: Provider폴더 제거 * refactor: useLocalStorage 훅 수정 * refactor: 로그인 그룹 마크업 수정 * feat: 회원가입 페이지로 이동 설정 * refactor: 텍스트 글자 크기 수정 * refactor: 페이지 로고그룹 , 로그인 그룹으로 분리 * refactor: LoginGroup 클래스 수정 * refactor: tsconfig src 옵션 재설정 * chore: zod,react-hook-form 설치 * feat: 로그인 zod 스키마 추가 * refactor: ErrorAlrt 최대 길이 수정 * refactor: react-hook-form으로 수정 * refactor: 불필요한 유틸 함수 제거 * refactor: 비밀번호 입력 아이콘 추가 * refactor: 아이콘 누를 때 input type 수정 * refactor: tsconfig 수정 , 로그인 로직 수정 * refactor: 로컬스토리지 훅 제거, 로그인 시 정보 스토리지에 저장 * refactor: 잘못된 속성 명 변경 * refactor: input 스타일 수정 * refactor: 페이지 디자인 수정 * refactor: icon폴더 제거, 페이지 스타일 재설정 * refactor: zod 제거,유효성 검사 부분 제거 * refactor: 유효성 검사 zod 제거 * refactor: 기존 input에서 Input컴포넌트로 교체 * refactor: 회원가입 이동 버튼에 마진 적용 * refactor: LogoGroup스타일 수정
- Loading branch information
Showing
9 changed files
with
132 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,13 @@ export const loginHandlers = [ | |
rest.post('/login', async (_, res, ctx) => { | ||
const rand = Math.floor(Math.random() * 10) | ||
|
||
return res(ctx.status(200), ctx.json(jwt[rand])) | ||
return res( | ||
ctx.status(200), | ||
ctx.json({ | ||
accessToken: jwt[rand], | ||
name: '효중', | ||
email: '[email protected]', | ||
}), | ||
) | ||
}), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { useForm } from 'react-hook-form' | ||
import Input from '@/components/Input' | ||
import { PATH } from '@/routes/constants' | ||
|
||
//TODO - 비밀번호 유효성 검사 필요 | ||
interface LoginGroupProps { | ||
handleLogin: (email: string, password: string) => void | ||
} | ||
const LoginGroup = ({ handleLogin }: LoginGroupProps) => { | ||
const { register, handleSubmit } = useForm() | ||
|
||
return ( | ||
<form | ||
className="flex flex-col gap-5" | ||
onSubmit={handleSubmit((data) => { | ||
handleLogin(data.email, data.password) | ||
})} | ||
> | ||
<div> | ||
<Input type="email" register={register('email')} /> | ||
</div> | ||
<div> | ||
<div> | ||
<Input type="password" register={register('password')} /> | ||
</div> | ||
</div> | ||
<div className="flex w-full flex-col"> | ||
<button className="pointer-cursor h-14 rounded-xl bg-active-orange text-lg text-white hover:border hover:border-black disabled:bg-opacity-50 dark:text-black md:text-xl"> | ||
로그인 | ||
</button> | ||
<a | ||
href={PATH.SIGN_UP} | ||
className="mt-2.5 flex w-[350px] max-w-[350px] justify-end text-xs text-active-orange md:text-sm" | ||
> | ||
회원가입 | ||
</a> | ||
</div> | ||
</form> | ||
) | ||
} | ||
|
||
export default LoginGroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { LogoColIcon } from '@/assets/icons' | ||
import { rangers } from '@/assets/images' | ||
|
||
const LogoGroup = () => { | ||
return ( | ||
<> | ||
<div className="md:hidden"> | ||
<LogoColIcon className="h-[4rem] w-[5.8rem]" /> | ||
</div> | ||
<img | ||
className="h-24 w-24 md:h-40 md:w-40" | ||
src={rangers} | ||
alt="리뷰레인저 모음집" | ||
/> | ||
</> | ||
) | ||
} | ||
|
||
export default LogoGroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default as LoginGroup } from './LoginGroup' | ||
export { default as LogoGroup } from './LogoGroup' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters