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] 홈 화면 API 연동 #57

Merged
merged 27 commits into from
May 22, 2024
Merged

[FEAT] 홈 화면 API 연동 #57

merged 27 commits into from
May 22, 2024

Conversation

AAminha
Copy link
Member

@AAminha AAminha commented May 20, 2024

1️⃣ 요약

  • 홈 화면 API 연동 및 TopNavigation 수정을 구현했습니다.
    • 홈 화면 API는 자기이해 프로그램 조회 / 브랜딩 프로그램 조회 / 브랜딩 프로그램 - 비로그인 버전 조회를 연동했습니다.
  • 금액 모달을 구현했습니다.
  • 필터값이 바뀔 때마다 api가 호출되는 게 문제가 될 것 같아서 useDebounce를 구현해 홈 api쪽에 적용했습니다.
  • resolved [FEAT] 홈 화면 API 연동 #46

2️⃣ 변경사항

기존 코드에 영향을 미치는 변경사항

  • API response 형식에 맞춰 props, 타입명 등이 수정되었습니다.
  • 추가적으로 QA 수정사항을 반영했습니다.
    • 설계하기 (Design) 결과 화면에서 definition 디자인 수정
    • 설계하기 칩 내용 수정
    • 온보딩 직업 리스트 추가
    • 사이드 네비게이션 오류 수정

기존 코드에 영향을 미치지 않는 변경사항

버그 수정을 위한 변경사항

3️⃣ 참고사항

4️⃣ 추후 작업

5️⃣ 리뷰 요구사항

Comment on lines 68 to 72
const [showAmountModal, setShowAmountModal] = useState<boolean>(false);
const [selectedAmount, setSelectedAmount] = useState<{ min: number; max: number }>({
min: 0,
max: 0,
});
Copy link
Member Author

Choose a reason for hiding this comment

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

showAmountModal : 모달창 띄울지 말지 결정하는 state
selectedAmount : 선택한 금액 범위 저장하는 state

Comment on lines 77 to 89
const getUnderstandProgram = async () => {
// 이거 로직 문제 있음. min보다 max가 작은 케이스.
try {
const response = await programAPI.getUnderstanding(
selectedAmount.min,
selectedAmount.max,
selectedProgramForm
);
setSelfUnderstandProgram(response.payload);
} catch (error) {
console.log(error);
}
};
Copy link
Member Author

Choose a reason for hiding this comment

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

아직 미완. 이런식으로 필터값 넘길 예정

Comment on lines +97 to +108
{showAmountModal && (
<SelectAmountModal
selectedAmount={selectedAmount}
handleCancel={() => {
setShowAmountModal(false);
}}
handleConfirm={(newSelected) => {
setSelectedAmount(newSelected);
setShowAmountModal(false);
}}
/>
)}
Copy link
Member Author

Choose a reason for hiding this comment

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

모달창 호출

Copy link
Member Author

Choose a reason for hiding this comment

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

오버레이 & 전체적인 틀만 잡아주는 모달 템플릿

Copy link
Member Author

Choose a reason for hiding this comment

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

금액 선택 모달

@AAminha AAminha changed the title Feat/#46/home api [FEAT] 홈 화면 API 연동 May 22, 2024
@AAminha AAminha added the ✨Feature 기능 개발 이슈 label May 22, 2024
@AAminha AAminha marked this pull request as ready for review May 22, 2024 10:51
@AAminha AAminha requested a review from mungjin01 as a code owner May 22, 2024 10:51
Copy link
Collaborator

@mungjin01 mungjin01 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

@AAminha AAminha merged commit 3f3a503 into develop May 22, 2024
@AAminha AAminha deleted the feat/#46/home-api branch May 22, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature 기능 개발 이슈
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 홈 화면 API 연동
2 participants