Skip to content

Commit

Permalink
feat: update UI log,Register show and hidden password
Browse files Browse the repository at this point in the history
  • Loading branch information
nhamngo29 committed Dec 3, 2024
1 parent 2d68dfa commit ca2bca8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/pages/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ResponseApi } from 'src/types/utils.type'
import { useContext, useState } from 'react'
import { AppContext } from 'src/contexts/app.context'
import Button from 'src/components/Button'
import InputPassword from 'src/components/InputPassword'
type FormData = Pick<Schema, 'userName' | 'password'>
const loginSchema = schema.pick(['userName', 'password'])
export default function Login() {
Expand Down Expand Up @@ -80,7 +81,7 @@ export default function Login() {
errorMessage={errors.userName?.message}
placeholder='Tên đăng nhập'
/>
<Input
<InputPassword
name='password'
register={register}
type='password'
Expand Down
5 changes: 3 additions & 2 deletions src/pages/Register/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { useContext } from 'react'
import { AppContext } from 'src/contexts/app.context'
import Button from 'src/components/Button'
import path from 'src/constants/path'
import InputPassword from 'src/components/InputPassword'
type FormData = Pick<Schema, 'email' | 'password' | 'confirmPassword' | 'fullName' | 'userName'>
const registerSchema = schema.pick(['email', 'confirmPassword', 'fullName', 'password', 'userName'])
export default function Register() {
Expand Down Expand Up @@ -84,7 +85,7 @@ export default function Register() {
errorMessage={errors.fullName?.message}
placeholder='Họ và tên'
/>
<Input
<InputPassword
name='password'
register={register}
type='password'
Expand All @@ -93,7 +94,7 @@ export default function Register() {
placeholder='Mật khẩu'
autoComplete='on'
/>
<Input
<InputPassword
name='confirmPassword'
register={register}
type='password'
Expand Down

0 comments on commit ca2bca8

Please sign in to comment.