Skip to content

Commit

Permalink
refactor: zod 제거,유효성 검사 부분 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
khj0426 committed Nov 6, 2023
1 parent de4cf8f commit cacfd72
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 31 deletions.
11 changes: 1 addition & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"react-dom": "^18.2.0",
"react-hook-form": "^7.47.0",
"react-router-dom": "^6.17.0",
"rippleui": "^1.12.1",
"zod": "^3.22.4"
"rippleui": "^1.12.1"
},
"devDependencies": {
"@commitlint/cli": "^18.0.0",
Expand Down
12 changes: 0 additions & 12 deletions src/pages/LoginPage/components/ErrorAlert.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions src/pages/LoginPage/components/LoginGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { zodResolver } from '@hookform/resolvers/zod'
import { useState } from 'react'
import { useForm } from 'react-hook-form'
import { EyeOnIcon, EyeOffIcon } from '@/assets/icons'
import { ErrorAlert } from '@/pages/LoginPage/components'
import { PATH } from '@/routes/constants'
import { loginSchema } from './constant'

Expand Down Expand Up @@ -41,7 +40,6 @@ const LoginGroup = ({ handleLogin }: LoginGroupProps) => {
placeholder="email"
/>
</div>
{errors.email && <ErrorAlert errortext="올바른 이메일 형식이 아닙니다" />}
<div className="flex flex-col justify-center gap-[0.44rem] rounded-md border border-gray-100 bg-white px-[0.63rem] pb-[0.69rem] pt-[0.31rem] focus-within:border-black dark:bg-main-red-200 dark:focus-within:border-white">
<label className="h-4 text-xs text-gray-100 md:text-sm">비밀번호</label>
<div className="flex items-center">
Expand All @@ -63,10 +61,6 @@ const LoginGroup = ({ handleLogin }: LoginGroupProps) => {
</i>
</div>
</div>
{errors.password && (
<ErrorAlert errortext="영문+숫자+특수문자 조합 8~15자리를 입력해주세요" />
)}

<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"
disabled={!!(errors.email ?? errors.password)}
Expand Down
1 change: 0 additions & 1 deletion src/pages/LoginPage/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default as LoginGroup } from './LoginGroup'
export { default as LogoGroup } from './LogoGroup'
export { default as ErrorAlert } from './ErrorAlert'

0 comments on commit cacfd72

Please sign in to comment.