-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/#68: 메인화면 리스트 api 연결 #75
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
Merged
The head ref may contain hidden characters: "feat/68-\uBA54\uC778\uD654\uBA74-\uB9AC\uC2A4\uD2B8-API-\uC5F0\uACB0"
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
fa9a531
feat/#68: 파티 리스트 API 엔드포인트 추가
donut74 3cef998
feat/#68: 파티 리스트 API 타입 정의 추가
donut74 5e64313
refactor/#68: 파티 리스트 엔드포인트 이름 변경
donut74 b57428d
feat/#68: 파티 리스트 조회 API 함수 추가
donut74 e2013ac
feat/#68: 파티 리스트 조회 React Query hook 추가
donut74 4bd44f7
feat/#68: 메인 리스트 카드 Api 데이터 연동
donut74 ceb558c
chore/#68: 파티 리스트 임시 데이터 추가
donut74 83ca212
feat/#68: 파티 리스트 컴포넌트 추가
donut74 d229c17
feat/#68: 메인 화면 파티 리스트 API 연동
donut74 e80cbd2
feat/#68: 파티 리스트 카테고리 필터 기능 추가
donut74 0576b1f
feat/#68: 카테고리 필터 클릭 기능 추가
donut74 2224188
chore/#68: 필터화에 맞게 mockdata 수정
donut74 d96b675
feat/#68: 카테고리 컴포넌트 메인화면 연결
donut74 d4f6521
style/#68: 카테고리 투명 보더 추가로 위치 이동 없이 수정
donut74 43828be
chore/#68: 공지 아이콘 추가
donut74 7fd8a21
feat/#68: 데이터 없을 때 UI 추가
donut74 98ba564
feat/#68: 마감파티 시에 UI 추가
donut74 f68e7af
feat/#68: 마감파티 이미지 블러 효과 추가
donut74 55ce8e4
feat/#68: 이미지 없을 때 기본 이미지 표시
donut74 e03c837
feat/#68: 메인화면 헤더 location 데이터 연결
donut74 d635c57
feat/#68: 헤더 닉네임 데이터 연결
donut74 0ae0aa3
chore/#68: 백 데이터 연결로 mockdata 삭제
donut74 0bb07a6
feat/#68: 파티 카드 이미지 에러 처리 및 기본 이미지 표시 기능 추가
donut74 3b74c94
chore/#68: 불필요한 콘솔 로그 제거 및 주석 처리
donut74 97f1c15
Merge remote-tracking branch 'origin/develop' into feat/68-메인화면-리스트-A…
donut74 25bad07
feat/#68: 데이터 불러올 때 isLoading을 이용해 빈 데이터 화면이 나오지 않도록 함
donut74 fd3ab0e
style/#68: 카테고리 activeOpacity 값 조정
donut74 3b9db8f
feat/#68: 파티 리스트 API 유효성 검사 및 에러 처리 추가
donut74 be10cb2
style/#68: PartyList paddingBottom 값 조정
donut74 32e08d0
refactor/#68: 파티 리스트 API 유효성 검사 로직 제거
donut74 044956d
feat/#68: 파티 카테고리 전역 상태 관리 스토어 추가
donut74 4c8c397
refactor/#68: PartyList 컴포넌트를 독립적으로 리팩토링
donut74 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import { PartyListParams, PartyListResponse } from "@/types/party"; | ||
| import { privateAxios } from "./axios"; | ||
| import { ENDPOINT } from "./urls"; | ||
|
|
||
| /** | ||
| * 파티 리스트 조회 API | ||
| * @param params 파티 리스트 조회 파라미터 (category, latitude, longitude) | ||
| * @returns 파티 리스트 응답 데이터 | ||
| */ | ||
| export const getPartyList = async ( | ||
| params: PartyListParams | ||
| ): Promise<PartyListResponse> => { | ||
| try { | ||
| const res = await privateAxios.get(ENDPOINT.PARTY.GET_PARTIES, { | ||
| params: { | ||
| category: params.category, | ||
| latitude: params.latitude, | ||
| longitude: params.longitude, | ||
| }, | ||
| }); | ||
|
|
||
| const responseData = res.data; | ||
|
|
||
| // hasNext와 totalCount가 없으면 기본값 설정 | ||
| return { | ||
| activeParties: responseData.activeParties || [], | ||
| closedParties: responseData.closedParties || [], | ||
| hasNext: responseData.hasNext ?? false, | ||
| totalCount: responseData.totalCount ?? 0, | ||
| }; | ||
| } catch (error) { | ||
| console.error("파티 리스트 로딩 실패:", error); | ||
| // 에러 발생 시 빈 데이터 구조를 던져주면 "파티가 없어요" 화면을 보여줍니다. | ||
| return { | ||
| activeParties: [], | ||
| closedParties: [], | ||
| hasNext: false, | ||
| totalCount: 0, | ||
| }; | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
isValidPartyItem와 isValidPartyListResponse를 구현하게 된 이유가 궁금합니다!
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.
타입스크립트의 런타임 에러 방지를 위해 추가했던 로직이었는데,
API 응답 타입이 이미 명시되어 있어 중복되는 검증 로직인것 같네요,,,
해당 부분은 수정하겠습니다!!