[박상우] 과제 제출#7
Conversation
- import font Inter - Nav 구현
- react-router-dom v6.4+ - createBrowserRouter에 정보 정의 - App.jsx 삭제
REFACTOR
- 기능을 제외한 회원가입 페이지 구현
- input 모은 뒤 form 이용해서 react-hook-form 적용 - refactor 진행해야 함(*) - error message field 확보해야 함(*)
FEAT: register page
- label, errormessage 컴포넌트화 - input type 별 정규식 설정 - navigate로 페이지 이동
FEAT: register
REFACTOR
- 회원가입 버튼 색상 조건 변경 - 특수문자 범위 제한(입력값의 예외 걸러내기 위함)
FIX: confirm button
kwakseongjae
left a comment
There was a problem hiding this comment.
훌륭하다 녀석아 ,,
Next에 익숙해진다고 React를 아예 놔도 되는건 아니니까 React에서 사용하는 컨벤션이나 구조 등에도 계속 익숙해지려 노력해보자 !!
| )}> | ||
| <LabelInfo children={'비밀번호'} /> | ||
| <div className='relative'> | ||
| <input type={isPasswordVisible ? "text" : "password"} className={classNames( |
| required: true, | ||
| pattern: { | ||
| value: /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!])[A-Za-z\d@$!%*#?&]{8,16}$/, | ||
| message: "비밀번호는 8자 이상 16자 이하, 하나 이상의 영문자와 숫자, @, #, ! 중 하나 이상의 특수문자로 구성되어야 합니다." |
There was a problem hiding this comment.
message를 일일이 입력하기보단
나는 파일을 따로 만들어서 관리하는 편이야
다음 아티클을 보면 조금 도움이 될거야 !
https://semaphoreci.com/blog/constants-layer-javascript
| import classNames from 'classnames'; | ||
|
|
||
| export const SignupButton = () => { | ||
| return (<div |
| const router = createBrowserRouter(routerInfo); | ||
|
|
||
| const root = ReactDOM.createRoot(document.getElementById('root')); | ||
| root.render( | ||
| <Fragment> | ||
| <RouterProvider router={router} /> | ||
| </Fragment> | ||
| ); |
There was a problem hiding this comment.
👍👍
나도 이렇게 적용하려 했는데 App 파일은 경유해보고 싶어서 다른 방식으로 작업했었거든 !
어느 방식이 좋다 나쁘다는 없겠지만 한번 두개를 비교해서 너한테 맞는걸로 가져가봐 !
우리 프로젝트 리포지토리 ! dev 브랜치에서 보면돼 !
https://github.com/SSA-FE/formssafe-fe
| marginLeft: 'auto', | ||
| marginRight: 'auto', |
There was a problem hiding this comment.
이렇게 작성한거랑
margin: 0 auto
랑 결과가 다르진 않을거같은데 ??
|
|
||
| const onSubmit = (data) => { | ||
| const { email, password } = data; | ||
| console.log(errors) |
|
|
||
| 'rounded-full', | ||
|
|
||
| watch('email') && watch('password') && watch('passwordConfirm') && !errors.email && !errors.password && !errors.passwordConfirm ? 'bg-theme cursor-pointer hover:bg-opacity-80' : 'bg-[#d4d4d4]', |
There was a problem hiding this comment.
가독성이 심상치 않네 ..
다른 방법으로 구현할 순 없을까 ?
There was a problem hiding this comment.
이 아티클 한번 읽어봐 !!
https://www.daleseo.com/tailwind-preflight/
REFACTOR
|
어제 나온 내용들이랑 위에 성재형이 리뷰해 준 내용 확인하고 리팩토링 했습니다!! 리뷰할 때 참고해주세용👻 |
👻 주요 기능
배포 링크
🏳️ 새로 알게 된 점 / 어려웠던 점
dynamic routing을path: 'user/:userId'처럼 사용할 수 있다.