-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] : 로그인(회원가입) 페이지 - 계좌정보 입력 페이지 구현 #64
[feat] : 로그인(회원가입) 페이지 - 계좌정보 입력 페이지 구현 #64
Conversation
- 계좌 정보 입력 페이지 : RegisterBankPage.jsx - 계좌 정보 입력 컴포넌트(Molecules) : BankForm.jsx 구현 - 은행은 토글 버튼을 통해 선택 & 계좌 번호는 직접 입력하는 형태 - 계좌 정보 미 입력시 경고 문구 계좌 정보 입력란 하단 출력 & Swal로 경고 alert 띄움 - 회원 가입 버튼 하단의 로그인 텍스트 클릭을 통해 로그인 화면으로 이동 가능 - API 함수 내용 추가 및 회원가입 완료 이후 홈 페이지로 이동 기능 구현 필요
POST.mp4 |
onChange={handleAccountNumberChange} | ||
/> | ||
</div> | ||
{!formValid && <ErrorMsg />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지금 상태로는 <ErrorMsg/>
가 전부 '필수 항목이 입력되지 않았습니다.' 요거 하나인데 제가 지금 어떤 에러인지를 prop으로 넘겨서 각 에러마다 다른 에러메시지를 띄우려고 시도 하고 있어요! 추후에 완료되면 pr 날리겠습니당..
<select | ||
className="w-[75px] h-[35px] rounded-lg border border-[#858585] mr-[15px] text-[10px]" | ||
onChange={handleBankChange} | ||
> | ||
<option value="">은행 선택</option> | ||
{banks.map((item) => ( | ||
<option key={item} value={item}> | ||
{item} | ||
</option> | ||
))} | ||
</select> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 한 selectInput
컴포넌트로 대체해도 좋을 것 같아요! 다만 react-hook-form
부분이 섞여있어서.. 시간이 되신다면! BankForm.jsx
부분을 react-hook-form
사용해서 리팩토링 해도 좋을 것 같아욥 지금도 물론 충분히 좋습니다 ~~ 👍🏻👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋은 말씀 감사합니다! ㅎㅎ 안그래도 이 부분 구현하면서, 배경님께서 개발해놓으신 selectInput
컴포넌트를 사용하면 좋을 것 같다고 생각했는데, react-hook-form
내용이 섞여들어가다 보니 이 부분을 제대로 활용하지 못할까봐 우선 기능적으로 작동할 수 있도록 저렇게 구현해보았습니다! 나중에 리팩토링할 시간적 여유가 생긴다면 바꿔봐도 좋을 것 같아요 :)
@@ -1,3 +1,38 @@ | |||
const bank = ['농협', '국민', '하나']; | |||
const bank = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻👍🏻
PR 타입(하나 이상의 PR 타입을 선택해주세요)
작업 사항
RegisterBankPage.jsx
BankForm.jsx
구현Swal
로 경고 alert 띄움default.mp4
관련 이슈