Skip to content

Conversation

@evaain706
Copy link
Contributor

@evaain706 evaain706 commented Aug 4, 2025

📌 변경 사항 개요

QA사항 수정/리팩토링

📝 상세 내용

  • 체험상세페이지 상단 마진
  • 상세페이지 후기 텍스트 패딩
  • 상세페이지 모바일 사이즈 패딩
  • 모바일 모달 선택된날짜없으면 못넘어가도록
  • 이미지 그리드 애니메이션 추가
  • 체험상세 레이아웃 수정
  • 예약인터페이스 모바일 사이즈 모달 z index 조정

🔗 관련 이슈

🖼️ 스크린샷(선택사항)

💡 참고 사항

Summary by CodeRabbit

  • 신규 기능

    • 모바일 이미지 슬라이더에 애니메이션 효과가 추가되어 이미지 전환이 부드럽게 표시됩니다.
    • 예약 모달에서 시간 미선택 시 오류 메시지가 표시되어, 시간 선택 없이 다음 단계로 진행할 수 없습니다.
  • 버그 수정

    • 404 오류 발생 시 활동 편집 페이지에서 정상적으로 404 페이지가 노출됩니다.
  • UI/스타일 개선

    • 활동 상세, 리뷰, 예약, 지도 등 여러 컴포넌트의 레이아웃, 여백, 색상, 그림자, 애니메이션 등 시각적 요소가 개선되었습니다.
    • 가격 표시가 한국어 천 단위 구분으로 표기됩니다.
    • 모달 및 예약 관련 UI의 z-index(레이어 우선순위)가 상향 조정되어 다른 요소 위에 잘 표시됩니다.
    • 리뷰 섹션의 비로그인, 빈 상태, 에러 메시지 등 안내 문구와 스타일이 통일되고 가독성이 향상되었습니다.
    • 활동 상세 폼과 제목, 평점 및 주소 표시 레이아웃이 개선되었습니다.
    • 예약 인터페이스의 버튼 및 날짜/시간 표시 영역에 애니메이션과 레이아웃 조정이 적용되었습니다.
    • 지도 컴포넌트의 높이가 반응형으로 조정되었습니다.
  • 기타

    • 불필요한 Skeleton 컴포넌트가 삭제되었습니다.
    • 일부 텍스트(예: "예약 중...")가 간결하게 수정되었습니다.
    • 예약 버튼에 추가 스타일 적용을 위한 클래스명 옵션이 추가되었습니다.

@evaain706 evaain706 self-assigned this Aug 4, 2025
@evaain706 evaain706 added the 🔨 Refactor 코드 리팩토링 label Aug 4, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 4, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

이 변경사항들은 주로 UI/UX 개선과 스타일링, 사용자 피드백 향상, 그리고 일부 예외 처리 로직 추가에 초점을 맞추고 있습니다. 여러 컴포넌트의 레이아웃, 애니메이션, 메시지, 접근성, 숫자 포맷팅, z-index 등이 조정되었으며, 일부 컴포넌트에서는 예외 상황(404 등)에 대한 처리가 보강되었습니다.

Changes

Cohort / File(s) Change Summary
Activity Detail Form 스타일 조정
src/app/(with-header)/activities/[id]/components/ActivityDetailForm.tsx
메인 컨테이너에 상단 마진(mt-30)과 모든 화면에서 수평 패딩(px-20) 추가.
이미지 슬라이더 애니메이션 개선
src/app/(with-header)/activities/[id]/components/ImageGrid.tsx
framer-motion을 활용해 모바일 이미지 슬라이더에 슬라이드 애니메이션 추가, 방향 상태 관리, alt 텍스트 간소화.
리뷰 섹션 빈 상태/권한 없음/에러 메시지 스타일 개선
src/app/(with-header)/activities/[id]/components/ReviewSection.tsx
빈 상태, 에러, 로그인 필요 상태의 메시지 및 컨테이너 스타일 통일, 메시지 문구 및 상호작용 제한 강화.
리뷰 요약 로직 보강
src/app/(with-header)/activities/[id]/components/ReviewTitle.tsx
리뷰 개수가 0일 때 별도 안내 메시지 우선 표시하도록 조건 분기 추가.
Skeleton 컴포넌트 제거
src/app/(with-header)/activities/[id]/components/Skeleton.tsx
로딩용 Skeleton 컴포넌트 파일 삭제.
타이틀 레이아웃 및 시맨틱 태그 개선
src/app/(with-header)/activities/[id]/components/Title.tsx
평점/주소 컨테이너에 flex-nowrap, gap 확대, span을 p 태그로 변경.
액티비티 수정 폼 404 예외 처리 추가
src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts
404 발생 시 next/navigation의 notFound() 호출로 404 페이지 렌더링.
예약 버튼 로딩 메시지 변경 및 className prop 추가
src/components/FloatingBox/BookingButton.tsx
로딩 메시지를 "예약 중..."에서 "..."로 단순화, className prop 추가 및 스타일 병합 리팩토링.
예약 인터페이스 스타일 개선 및 PriceDisplay 컴포넌트화
src/components/FloatingBox/BookingInterface.tsx
모바일/태블릿 뷰 스타일 개선, 가격 표시를 PriceDisplay 컴포넌트로 분리, 애니메이션 추가.
가격 포맷팅 현지화
src/components/FloatingBox/PriceDisplay.tsx
가격 표시를 toLocaleString('ko-KR')로 현지화.
지도 컴포넌트 높이 반응형 조정
src/components/LocationMap.tsx
지도 컨테이너 높이를 400px(기본)/480px(md 이상)로 반응형 변경.
모달 z-index 상향
src/components/Modal/Content.tsx
기본 z-index를 50에서 999로 상향 조정.
모바일 예약 모달 UX 개선
src/ui/MobileBookingModal.tsx
시간 미선택 시 다음 단계 진입 방지 및 에러 토스트, z-index 상향, 확인 단계 UI 개선, 버튼 핸들러 분리.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MobileBookingModal
    participant Toast

    User->>MobileBookingModal: "다음" 버튼 클릭 (date-time 단계)
    alt 시간 선택됨
        MobileBookingModal->>MobileBookingModal: 단계 전환
    else 시간 미선택
        MobileBookingModal->>Toast: 에러 토스트("시간을 선택하세요")
    end

    User->>MobileBookingModal: "확인" 버튼 클릭 (confirm 단계)
    MobileBookingModal->>MobileBookingModal: 모달 닫기, 단계 초기화
Loading
sequenceDiagram
    participant User
    participant ImageGrid

    User->>ImageGrid: 모바일 슬라이더에서 "다음" or "이전" 클릭
    ImageGrid->>ImageGrid: direction 상태 변경
    ImageGrid->>ImageGrid: AnimatePresence + motion.div로 슬라이드 애니메이션
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

Suggested labels

🎨 design

Suggested reviewers

  • BokyungCodes
  • LeeCh0129

Poem

🐰
레이아웃이 바뀌고, 슬라이더가 춤추네,
리뷰의 빈자리도 한결 예뻐졌지!
가격은 콕콕, 한국식으로 찍고,
모달은 더 위로, 예약도 더 똑똑!
오늘도 코드를 다듬는 토끼의 발끝,
변화의 행진은 계속될 거야, 깡총깡총!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e66a7ad and 0c74219.

📒 Files selected for processing (3)
  • src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts (2 hunks)
  • src/components/FloatingBox/BookingButton.tsx (1 hunks)
  • src/ui/MobileBookingModal.tsx (5 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/130

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🔭 Outside diff range comments (4)
src/components/LocationMap.tsx (1)

67-76: 로딩 상태와 실제 맵 높이 불일치

로딩 상태에서는 고정 높이 500px을 사용하지만, 실제 맵은 400px/480px을 사용합니다. 이로 인해 레이아웃 시프트가 발생할 수 있습니다.

-      <div className='flex h-[500px] w-full items-center justify-center overflow-hidden rounded-lg shadow-md lg:max-w-[800px]'>
+      <div className='flex h-[400px] w-full items-center justify-center overflow-hidden rounded-lg shadow-md md:h-[480px] lg:max-w-[1200px]'>
src/app/(with-header)/activities/[id]/components/ReviewTitle.tsx (1)

35-35: useEffect 의존성 배열 불완전

useEffect 내부에서 rating 값을 사용하지만 의존성 배열에는 reviewCount만 포함되어 있습니다. rating이 변경될 때도 요약이 업데이트되어야 합니다.

-  }, [reviewCount]);
+  }, [reviewCount, rating]);
src/components/FloatingBox/BookingInterface.tsx (1)

117-129: 버튼 요소에 type 속성 추가 필요

태블릿 뷰의 날짜 선택 버튼에 type="button" 속성을 추가해야 합니다. 또한 레이아웃 개선(flex, items-center, justify-center)과 애니메이션 효과(animate-pulse) 추가로 사용자 경험이 향상되었습니다.

다음과 같이 수정하세요:

            <button
+             type="button"
              onClick={() => setIsOpen(true)}
              className='flex w-full items-center justify-center rounded-lg border border-gray-300 p-3 py-8 text-left text-black hover:bg-gray-50'
            >
src/ui/MobileBookingModal.tsx (1)

97-118: 버튼 요소에 type 속성 추가 필요

푸터의 gap 증가(gap-20)로 버튼 간격이 개선되었습니다. 하지만 정적 분석 도구가 지적한 대로 "다음" 버튼에 type="button" 속성을 추가해야 합니다.

다음과 같이 수정하세요:

              <button
+               type="button"
                onClick={next}
                className='flex-1 rounded-lg bg-green-800 px-10 py-10 font-medium text-white hover:bg-green-900'
              >
                다음
              </button>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4c9f0a3 and e66a7ad.

📒 Files selected for processing (13)
  • src/app/(with-header)/activities/[id]/components/ActivityDetailForm.tsx (1 hunks)
  • src/app/(with-header)/activities/[id]/components/ImageGrid.tsx (2 hunks)
  • src/app/(with-header)/activities/[id]/components/ReviewSection.tsx (2 hunks)
  • src/app/(with-header)/activities/[id]/components/ReviewTitle.tsx (1 hunks)
  • src/app/(with-header)/activities/[id]/components/Skeleton.tsx (0 hunks)
  • src/app/(with-header)/activities/[id]/components/Title.tsx (2 hunks)
  • src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts (2 hunks)
  • src/components/FloatingBox/BookingButton.tsx (1 hunks)
  • src/components/FloatingBox/BookingInterface.tsx (2 hunks)
  • src/components/FloatingBox/PriceDisplay.tsx (1 hunks)
  • src/components/LocationMap.tsx (1 hunks)
  • src/components/Modal/Content.tsx (1 hunks)
  • src/ui/MobileBookingModal.tsx (5 hunks)
💤 Files with no reviewable changes (1)
  • src/app/(with-header)/activities/[id]/components/Skeleton.tsx
🧰 Additional context used
🧬 Code Graph Analysis (3)
src/components/FloatingBox/BookingButton.tsx (1)
src/app/(non-header)/oauth/kakao/components/KakaoLoading.tsx (1)
  • KakaoLoading (7-16)
src/app/(with-header)/activities/[id]/components/ImageGrid.tsx (1)
src/types/activityDetailType.ts (1)
  • ImageGridProps (1-4)
src/ui/MobileBookingModal.tsx (3)
src/components/FloatingBox/TotalPriceDisplay.tsx (1)
  • TotalPriceDisplay (3-12)
src/components/FloatingBox/BookingButton.tsx (1)
  • BookingButton (10-36)
src/ui/BookingModal.tsx (1)
  • BookingModal (8-22)
🪛 Biome (2.1.2)
src/app/(with-header)/activities/[id]/components/ImageGrid.tsx

[error] 67-73: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)


[error] 76-81: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

src/ui/MobileBookingModal.tsx

[error] 109-114: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

src/components/FloatingBox/BookingInterface.tsx

[error] 117-121: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

🔇 Additional comments (21)
src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts (2)

11-11: 새로운 import가 올바르게 추가되었습니다.

Next.js의 notFound 함수를 가져오는 것이 404 에러 처리에 적합합니다.


36-39: useQuery 구조분해할당이 적절히 업데이트되었습니다.

에러 처리를 위해 statuserror를 추가로 구조분해할당한 것이 좋습니다.

src/components/LocationMap.tsx (1)

80-80: 반응형 높이 변경 잘 적용됨

모바일 우선 반응형 디자인으로 높이를 조정한 것은 좋은 개선사항입니다.

src/components/FloatingBox/PriceDisplay.tsx (1)

5-6: 한국어 숫자 형식 적용 우수

toLocaleString('ko-KR')를 사용하여 가격에 천단위 구분자를 추가한 것은 훌륭한 현지화 개선사항입니다. 사용자 가독성이 크게 향상됩니다.

src/components/FloatingBox/BookingButton.tsx (1)

29-29: 로딩 텍스트 단순화에 대한 접근성 고려

"예약 중..."에서 "..."로 변경한 것이 시각적으로는 간단해 보이지만, 접근성 측면에서는 명확성이 떨어질 수 있습니다. 스크린 리더 사용자나 시각적 컨텍스트를 놓칠 수 있는 사용자들에게는 명시적인 텍스트가 더 도움이 됩니다.

원래 텍스트를 유지하는 것을 고려해보세요:

-          <p>...</p>
+          <p>예약 중...</p>
src/app/(with-header)/activities/[id]/components/ReviewTitle.tsx (1)

18-21: 후기 없음 상태 처리 개선 우수

후기가 없을 때 명확한 메시지를 표시하는 것은 좋은 UX 개선사항입니다.

src/app/(with-header)/activities/[id]/components/Title.tsx (2)

49-49: 코드 가독성 개선 확인

함수 사이의 빈 줄 추가로 코드 가독성이 향상되었습니다.


59-67: 레이아웃 및 시맨틱 HTML 개선 확인

flex-nowrapgap-30을 통한 레이아웃 개선과 <span>에서 <p> 태그로의 변경을 통한 시맨틱 HTML 개선이 잘 적용되었습니다. 평점과 주소 표시의 가독성과 접근성이 향상되었습니다.

src/app/(with-header)/activities/[id]/components/ActivityDetailForm.tsx (1)

99-99: 여백 및 패딩 조정 확인

상단 여백(mt-30)과 수평 패딩(px-20) 추가로 레이아웃의 일관성과 가독성이 개선되었습니다. 모든 화면 크기에서 적절한 여백이 적용됩니다.

src/app/(with-header)/activities/[id]/components/ImageGrid.tsx (3)

6-6: framer-motion 애니메이션 추가 확인

모바일 이미지 슬라이더에 부드러운 애니메이션 효과를 추가하여 사용자 경험이 크게 향상되었습니다.


12-37: 애니메이션 로직 구현 확인

direction state와 variants 객체를 통한 애니메이션 로직이 잘 구현되었습니다. 슬라이드 방향에 따른 자연스러운 전환 효과가 구현되어 사용자 경험이 개선되었습니다.


43-65: 애니메이션 적용 확인

AnimatePresencemotion.div를 통한 이미지 전환 애니메이션이 잘 구현되었습니다. spring 물리학과 opacity 전환을 통해 자연스러운 슬라이드 효과가 적용되었습니다.

src/components/FloatingBox/BookingInterface.tsx (1)

148-179: 모바일 UI 개선 확인

모바일 뷰의 높이 고정(h-150)과 패딩 조정(px-20), 그리고 animate-pulsecursor-pointer 스타일 추가로 사용자 인터페이스가 개선되었습니다. PriceDisplay 컴포넌트 사용으로 코드 재사용성도 향상되었습니다.

src/ui/MobileBookingModal.tsx (5)

12-12: 토스트 알림 import 추가 확인

사용자 피드백을 위한 토스트 알림 라이브러리 import가 추가되었습니다.


31-35: 시간 선택 검증 로직 추가 확인

날짜-시간 단계에서 시간이 선택되지 않은 상태로 다음 단계로 진행하는 것을 방지하는 검증 로직이 추가되어 사용자 경험이 개선되었습니다. 명확한 에러 메시지 제공으로 사용성이 향상되었습니다.


43-46: 모달 닫기 함수 추가 확인

handleConfirm 함수를 통해 모달을 닫고 단계를 초기화하는 로직이 잘 구현되었습니다. 사용자 플로우 관리가 개선되었습니다.


56-56: z-index 증가 확인

모달 콘텐츠의 z-index를 9999로 증가시켜 다른 UI 요소들과의 레이어링 충돌을 방지하였습니다. 이는 다른 모달 컴포넌트와의 일관성을 위한 좋은 변경사항입니다.


83-93: 확인 단계 UI 개선 확인

날짜/시간 표시 방식 개선과 총 가격 표시를 우측 하단으로 정렬하여 레이아웃이 더욱 직관적으로 변경되었습니다.

src/app/(with-header)/activities/[id]/components/ReviewSection.tsx (3)

90-96: 빈 상태 UI 개선이 잘 되었습니다.

"리뷰"에서 "후기"로 변경한 것이 더 자연스러운 한국어 표현이며, 그림자, 테두리, 상호작용 방지 등의 스타일링 추가로 사용자 경험이 향상되었습니다.


103-103: 에러 메시지 개선이 좋습니다.

기존의 "에러발생"보다 구체적이고 정보를 제공하는 메시지로 변경되어 디버깅과 사용자 경험에 도움이 됩니다.


114-120: 비로그인 사용자를 위한 오버레이 스타일링이 우수합니다.

빈 상태와 일관된 디자인으로 사용자에게 명확한 시각적 피드백을 제공하며, 로그인을 유도하는 메시지가 적절히 배치되었습니다.

Comment on lines 67 to 73
<button
onClick={prevSlide}
aria-label='이전 이미지'
className='absolute top-1/2 left-2 -translate-y-1/2 rounded-full bg-black/50 px-6 py-10 text-white'
>
</button>
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

버튼 요소에 type 속성 추가 필요

정적 분석 도구가 지적한 대로 버튼 요소에 명시적인 type 속성이 필요합니다. 폼 내부에서 의도하지 않은 제출을 방지하기 위해 type="button"을 추가해야 합니다.

다음과 같이 수정하세요:

        <button
+         type="button"
          onClick={prevSlide}
          aria-label='이전 이미지'
          className='absolute top-1/2 left-2 -translate-y-1/2 rounded-full bg-black/50 px-6 py-10 text-white'
        >
          ‹
        </button>

        <button
+         type="button"
          onClick={nextSlide}
          aria-label='다음 이미지'
          className='absolute top-1/2 right-2 -translate-y-1/2 rounded-full bg-black/50 px-6 py-10 text-white'
        >
          ›
        </button>

Also applies to: 75-81

🧰 Tools
🪛 Biome (2.1.2)

[error] 67-73: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

🤖 Prompt for AI Agents
In src/app/(with-header)/activities/[id]/components/ImageGrid.tsx around lines
67 to 73 and also lines 75 to 81, the button elements lack an explicit type
attribute, which can cause unintended form submissions. Add type="button" to
each button element to explicitly define their behavior and prevent accidental
form submissions.

<ReviewTitle reviewCount={reviewCount} rating={rating} />

<div className='relative min-h-350'>
<div className='pointer-events-none relative min-h-350 select-none'>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

사용자 상호작용 제한을 재검토해주세요.

pointer-events-noneselect-none 클래스가 전체 리뷰 컨테이너에 적용되어 로그인한 사용자도 리뷰 내용과 상호작용(텍스트 선택, 클릭 등)할 수 없게 됩니다. 이 제한이 로그인하지 않은 사용자에게만 적용되도록 조건부로 적용하는 것을 고려해보세요.

다음과 같이 수정하는 것을 제안합니다:

-      <div className='pointer-events-none relative min-h-350 select-none'>
+      <div className={`relative min-h-350 ${!user ? 'pointer-events-none select-none' : ''}`}>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className='pointer-events-none relative min-h-350 select-none'>
<div className={`relative min-h-350 ${!user ? 'pointer-events-none select-none' : ''}`}>
🤖 Prompt for AI Agents
In src/app/(with-header)/activities/[id]/components/ReviewSection.tsx at line
110, the classes 'pointer-events-none' and 'select-none' are applied
unconditionally to the review container, preventing all users from interacting
with the review content. Modify the code to apply these classes conditionally
only when the user is not logged in, allowing logged-in users to interact with
the review section normally.

Comment on lines +47 to +55
if (status === 'error') {
const axiosError = error as AxiosError;
const httpStatus = axiosError.response?.status;

if (httpStatus === 404) {
console.log('404 에러임');
notFound();
}
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

404 에러 처리 로직의 위치를 수정해주세요.

현재 에러 처리 로직이 컴포넌트 본문 외부에 위치하여 렌더링 중에 실행됩니다. 이는 React의 규칙을 위반하고 예상치 못한 동작을 일으킬 수 있습니다.

다음과 같이 수정하여 에러 처리를 useEffect 내부로 이동시키거나 별도의 효과로 분리하는 것을 권장합니다:

-  if (status === 'error') {
-    const axiosError = error as AxiosError;
-    const httpStatus = axiosError.response?.status;
-
-    if (httpStatus === 404) {
-      console.log('404 에러임');
-      notFound();
-    }
-  }
+  useEffect(() => {
+    if (status === 'error') {
+      const axiosError = error as AxiosError;
+      const httpStatus = axiosError.response?.status;
+
+      if (httpStatus === 404) {
+        console.log('Activity not found (404)');
+        notFound();
+      }
+    }
+  }, [status, error]);

추가 개선사항:

  • 디버깅을 위해 콘솔 메시지를 영어로 변경
  • useEffect를 사용하여 부수효과를 적절히 관리
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (status === 'error') {
const axiosError = error as AxiosError;
const httpStatus = axiosError.response?.status;
if (httpStatus === 404) {
console.log('404 에러임');
notFound();
}
}
useEffect(() => {
if (status === 'error') {
const axiosError = error as AxiosError;
const httpStatus = axiosError.response?.status;
if (httpStatus === 404) {
console.log('Activity not found (404)');
notFound();
}
}
}, [status, error]);
🤖 Prompt for AI Agents
In src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts around
lines 47 to 55, the 404 error handling logic is currently placed outside of a
React effect, causing it to run during rendering which violates React rules.
Move this error handling code inside a useEffect hook that depends on the status
and error variables to properly manage side effects. Also, change the console
log message to English for consistency and clarity.

const [isMounted, setIsMounted] = useState(false);

const zIndexClass = zIndex ? `z-[${zIndex}]` : 'z-50';
const zIndexClass = zIndex ? `z-[${zIndex}]` : 'z-999';
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

z-index 값 관리 체계화 필요

z-index를 50에서 999로 크게 증가시킨 것은 즉각적인 레이어링 문제는 해결할 수 있지만, 향후 유지보수에 어려움을 줄 수 있습니다.

z-index 값들을 체계적으로 관리하는 것을 권장합니다:

  • 기본 컨텐츠: 1-99
  • 드롭다운/툴팁: 100-199
  • 모달/오버레이: 200-299
  • 최상위 알림: 300+
-  const zIndexClass = zIndex ? `z-[${zIndex}]` : 'z-999';
+  const zIndexClass = zIndex ? `z-[${zIndex}]` : 'z-200';
🤖 Prompt for AI Agents
In src/components/Modal/Content.tsx at line 34, the zIndex value is set directly
to 999 or a custom value, which lacks a structured management approach. Refactor
the code to use a defined zIndex scale for different UI layers, such as 1-99 for
base content, 100-199 for dropdowns/tooltips, 200-299 for modals/overlays, and
300+ for top-level notifications. Replace the hardcoded 'z-999' with a constant
or enum representing the modal layer range (200-299) to ensure consistent and
maintainable z-index usage.

Copy link
Contributor

@minimo-9 minimo-9 left a comment

Choose a reason for hiding this comment

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

QA 때 나온 부분 수정하시느라 고생많으셨습니다!

Copy link
Contributor

@LeeCh0129 LeeCh0129 left a comment

Choose a reason for hiding this comment

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

QA사항 수정/리팩토링 하시느라 고생많으셨습니다! 내일까지 화이팅입니다.

Copy link
Contributor

@BokyungCodes BokyungCodes left a comment

Choose a reason for hiding this comment

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

수정하시느라 고생하셨습니다! 이제 끝나가네요ㅠㅠ

@evaain706 evaain706 merged commit 5a01586 into develop Aug 4, 2025
1 of 2 checks passed
@evaain706 evaain706 deleted the fix/130 branch August 4, 2025 06:22
@coderabbitai coderabbitai bot mentioned this pull request Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants