Skip to content
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

Merged
merged 7 commits into from
Oct 29, 2023

Conversation

rktdnjs
Copy link
Contributor

@rktdnjs rktdnjs commented Oct 28, 2023

PR 타입(하나 이상의 PR 타입을 선택해주세요)

  • 기능 추가
  • 기능 삭제
  • 버그 수정
  • CSS등 UI 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트

작업 사항

  • 계좌 정보 입력 페이지 : RegisterBankPage.jsx
  • 계좌 정보 입력 컴포넌트(Molecules) : BankForm.jsx 구현
  • 은행은 토글 버튼을 통해 선택 & 계좌 번호는 직접 입력하는 형태
  • 계좌 정보 미 입력시 경고 문구 계좌 정보 입력란 하단 출력 & Swal로 경고 alert 띄움
  • 회원 가입 버튼 하단의 로그인 텍스트 클릭을 통해 로그인 화면으로 이동 가능
  • API 함수 내용 추가 및 회원가입 완료 이후 홈 페이지로 이동 기능 구현이 필요한데, 이번주 PR Merge 전까지 끝내겠습니다!

레이아웃

image

image

image

default.mp4

관련 이슈

- 계좌 정보 입력 페이지 : RegisterBankPage.jsx
- 계좌 정보 입력 컴포넌트(Molecules) : BankForm.jsx 구현
- 은행은 토글 버튼을 통해 선택 & 계좌 번호는 직접 입력하는 형태
- 계좌 정보 미 입력시 경고 문구 계좌 정보 입력란 하단 출력 & Swal로 경고 alert 띄움
- 회원 가입 버튼 하단의 로그인 텍스트 클릭을 통해 로그인 화면으로 이동 가능
- API 함수 내용 추가 및 회원가입 완료 이후 홈 페이지로 이동 기능 구현 필요
@rktdnjs rktdnjs added the ✨ feature This feature will be developed label Oct 28, 2023
@rktdnjs rktdnjs self-assigned this Oct 28, 2023
@rktdnjs
Copy link
Contributor Author

rktdnjs commented Oct 29, 2023

계좌 정보 입력 페이지(구현 완료)

POST.mp4
  • 현재 요청을 보낼 시 우측에 뜨는 에러들은
  • ㄴ현재 백엔드 API가 연결되어 있지 않음(404)
  • apis/index.js에서 404에러 발생시 에러 메시지를 error.response.data.error.message 형태로 받아와 읽는데, 그 과정에서 제대로 된 값이 현재 정의되어 있지 않아 발생(백엔드 API 연결 이후 수정 예정입니다!)
  • 따라서, 현재 POST 요청을 보낼 때 데이터로 은행 & 계좌 번호가 잘 담겨가는 모습을 볼 수 있기에, 이후 백엔드 API가 연결되면 전체적으로 한 번 다시 손보도록 하겠습니다!
    image

@rktdnjs rktdnjs changed the title [feat] : 로그인(회원가입) 페이지 - 계좌정보 입력 페이지 구현(80%) [feat] : 로그인(회원가입) 페이지 - 계좌정보 입력 페이지 구현 Oct 29, 2023
onChange={handleAccountNumberChange}
/>
</div>
{!formValid && <ErrorMsg />}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

지금 상태로는 <ErrorMsg/> 가 전부 '필수 항목이 입력되지 않았습니다.' 요거 하나인데 제가 지금 어떤 에러인지를 prop으로 넘겨서 각 에러마다 다른 에러메시지를 띄우려고 시도 하고 있어요! 추후에 완료되면 pr 날리겠습니당..

Comment on lines +67 to +77
<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>
Copy link
Contributor

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사용해서 리팩토링 해도 좋을 것 같아욥 지금도 물론 충분히 좋습니다 ~~ 👍🏻👍🏻

Copy link
Contributor Author

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 = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻👍🏻

@rktdnjs rktdnjs merged commit eee5a3b into Step3-kakao-tech-campus:weekly-8 Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature This feature will be developed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants