Skip to content

Refactor/chat message#93

Merged
skybluesharkk merged 9 commits intokakao-tech-campus-3rd-step3:developfrom
dib3474:refactor/chat-message
Mar 6, 2026
Merged

Refactor/chat message#93
skybluesharkk merged 9 commits intokakao-tech-campus-3rd-step3:developfrom
dib3474:refactor/chat-message

Conversation

@dib3474
Copy link
Copy Markdown
Contributor

@dib3474 dib3474 commented Feb 17, 2026

  1. 마이페이지 좋아요한 축제 이미지 사이즈 조정
    관련 이슈 : close: 마이페이지 좋아요한 축제 이미지 비율 버그 #91

  2. api 기본 변수 상수로 분리

  3. 마이페이지 캐시 조건 완화로 불필요한 리렌더링 방지

@dib3474 dib3474 requested a review from Copilot February 17, 2026 16:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on refactoring API imports, optimizing MyPage caching behavior, and adjusting festival image sizing. The main changes consolidate the ApiErrorResponse type definition and introduce consistent default pagination constants across the codebase.

Changes:

  • Moved ApiErrorResponse type from apiInstance.ts to apiResponse.ts and updated all imports
  • Introduced DEFAULT_PAGE and DEFAULT_SIZE constants in pagination-related API functions
  • Updated MyPage cache settings to reduce unnecessary re-renders by adding refetchOnMount: false and refetchOnWindowFocus: false
  • Added aspect-[4/5] class to festival card images in MyPage
  • Simplified conditional logic in useChatRoom hook for message initialization

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/apis/apiInstance.ts Removed duplicate ApiErrorResponse interface definition
src/apis/apiResponse.ts Removed obsolete comment from ApiErrorResponse interface
src/apis/*/*.ts (multiple files) Updated imports to use ApiErrorResponse from apiResponse.ts and consolidated import statements
src/apis/search/searchFestivals.ts Replaced inline default values with DEFAULT_PAGE and DEFAULT_SIZE constants, fixed typo in variable names
src/apis/festivals/getMyFestivals.ts Introduced DEFAULT_PAGE and DEFAULT_SIZE constants for pagination
src/apis/review/getMyReviews.ts Introduced DEFAULT_PAGE and DEFAULT_SIZE constants for pagination
src/apis/review/getMyReviewFestivals.ts Introduced DEFAULT_PAGE and DEFAULT_SIZE constants for pagination
src/apis/wish/getMyWishFestivals.ts Introduced DEFAULT_PAGE and DEFAULT_SIZE constants for pagination
src/apis/chat/getMyChats.ts Introduced DEFAULT_PAGE and DEFAULT_SIZE constants for pagination
src/apis/review/getSingleReview.ts Updated import path to use absolute path for Review type
src/pages/My/components/MyPageWishFestivalsSection.tsx Replaced staleTime: 0, gcTime: 0 with refetchOnMount: false, refetchOnWindowFocus: false
src/pages/My/components/MyPageReviewFestivalsSection.tsx Added refetchOnMount: false, refetchOnWindowFocus: false while keeping existing cache settings
src/pages/My/components/MyPageFestivalCard.tsx Added aspect-[4/5] class to festival poster image
src/hooks/useChatRoom.ts Refactored message initialization logic to use ternary operator

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/apis/search/searchFestivals.ts:1

  • The function signature is missing the ApiErrorResponse type parameter for error handling consistency. Add ApiErrorResponse as the second generic parameter to match other API functions in the codebase.
import { apiInstance } from '@/apis/apiInstance';

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dib3474 dib3474 requested a review from skybluesharkk March 6, 2026 04:52
Copy link
Copy Markdown
Collaborator

@skybluesharkk skybluesharkk left a comment

Choose a reason for hiding this comment

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

변경하신 부분들 모두 확인하였습니다
고생하셨어요!

export const getMyReviews = async (
page = 0,
size = 5,
page = DEFAULT_PAGE,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

상수로 바꿔준거 좋네요!

src={data.posterInfo}
alt={`${data.title} 축제 이미지`}
className="h-full object-cover"
className="h-full aspect-[4/5] object-cover"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

비율을 사용하셨군요

@skybluesharkk skybluesharkk merged commit 8b55f21 into kakao-tech-campus-3rd-step3:develop Mar 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

마이페이지 좋아요한 축제 이미지 비율 버그

3 participants