Skip to content

Conversation

@Yeonseo-Jo
Copy link
Contributor

@Yeonseo-Jo Yeonseo-Jo commented Nov 27, 2025

close #22

☑️ 완료 태스크

  • api 개발
  • api hook 개발

🔎 PR 내용

공통 사용 부분인 PR 리뷰 요청 글 전체 조회 (QueryPrReviews) api 단 구현한 PR 먼저 main에 반영합니다

 const { data, isLoading, error } = useQueryPrReviews(Object.keys(parsedFilters))
 
// 리스트 데이터만 사용한다면 다음과 같이 파싱
 const prReviews = data?.data.prReviews

📷 스크린샷

  • 개발중인 브랜치에서 목록 불러오기 / 필터링 잘 동작함을 확인했습니다!
2025-11-28.00.34.05.mov

Copy link
Member

@seobbang seobbang left a comment

Choose a reason for hiding this comment

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

깔꼼하네요 ~ ~ 👍


export async function queryPrReviews(params?: QueryPrReviewsQueryParams): Promise<ApiResponse<QueryPrReviewsResponse>> {
return apiClient.get<QueryPrReviewsResponse>("api/v1/pr-reviews", {
searchParams: params as Record<string, string | number>,
Copy link
Member

Choose a reason for hiding this comment

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

요기 단언 들어가야하는거 되게 특이하네요,,, 그럼 searchParams 넘겨줄 때마다 단언이 필요하다니

Suggested change
searchParams: params as Record<string, string | number>,
searchParams: {...params}

object literal로 추론하게 요런 방법도 있네요 ㅎㅎㅎ..

Copy link
Member

@jungwoo3490 jungwoo3490 Dec 7, 2025

Choose a reason for hiding this comment

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

Suggested change
searchParams: params as Record<string, string | number>,
searchParams: {...params}

object literal로 추론하게 요런 방법도 있네요 ㅎㅎㅎ..

호오 리터럴로 추론하는 방법 좋은데요?!

isLast: boolean;
}

export async function queryPrReviews(params?: QueryPrReviewsQueryParams): Promise<ApiResponse<QueryPrReviewsResponse>> {
Copy link
Member

Choose a reason for hiding this comment

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

요기 반환 타입 명시 빼줘도 괜찮을 것 같아요-!

import { prListQueryKeys } from "./querykeys";

export const useQueryPrReviews = (params?: QueryPrReviewsQueryParams) => {
return useQuery<ApiResponse<QueryPrReviewsResponse>, Error>({
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return useQuery<ApiResponse<QueryPrReviewsResponse>, Error>({
return useQuery({

요기도 추론돼서 없어도 괜찮을 것 같아욤

Copy link
Member

@jungwoo3490 jungwoo3490 left a comment

Choose a reason for hiding this comment

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

굿입니다요!!👍🏻👍🏻


export async function queryPrReviews(params?: QueryPrReviewsQueryParams): Promise<ApiResponse<QueryPrReviewsResponse>> {
return apiClient.get<QueryPrReviewsResponse>("api/v1/pr-reviews", {
searchParams: params as Record<string, string | number>,
Copy link
Member

@jungwoo3490 jungwoo3490 Dec 7, 2025

Choose a reason for hiding this comment

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

Suggested change
searchParams: params as Record<string, string | number>,
searchParams: {...params}

object literal로 추론하게 요런 방법도 있네요 ㅎㅎㅎ..

호오 리터럴로 추론하는 방법 좋은데요?!

Comment on lines +27 to +29
status: string;
/** 분야 태그 */
position: string;
Copy link
Member

@jungwoo3490 jungwoo3490 Dec 7, 2025

Choose a reason for hiding this comment

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

요기 QueryPrReviewsQueryParams로 넘길 수 있는 값이랑 같으면 타입 좁혀줘도 좋을 것 같아요~!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: PR 리뷰 요청 목록 api 선행 구현

4 participants