Skip to content

Conversation

@kimnamheeee
Copy link
Contributor

@kimnamheeee kimnamheeee commented Aug 7, 2025

📝 설명

  • 홈 화면 레이아웃을 생성하고 관련 api를 연결하였습니다.

🛠️ 주요 변경 사항

  • 홈 화면에서 사용될 navigation 컴포넌트 생성 488b0ef 24f6b69
  • 홈 화면 레이아웃 구성 3326b37
  • react queryClient 생성 17af0d0
  • 홈 화면 게임 api 핸들러 작성 911adf2
  • 홈 화면 게임 api 연결 및 캐싱 0bd8dff
  • gamePreview 컴포넌트 생성 f4bbd7c
  • gamePreview api 연동 f4bbd7c

리뷰 시 고려해야 할 사항

  • 모든 화면은 현재 1920*1080 고정 크기를 기준으로 작업하고 있습니다. 반응형 디자인이 전혀 적용되어 있지 않아 다른 viewport에서는 화면이 깨질 가능성이 큽니다...
  • 작업 순서가 애매하고 시간이 모자라서 불가피하게 하나의 브랜치에 여러 이슈 관련 작업이 섞이게 되었습니다. 다음 pr부터는 지양하도록 하겠습니다...
  • 컴포넌트 위치/디렉토리 구조가 애매하거나 일관성 없는 것들이 있어 이 부분은 나중에 리팩토링 pr에서 한 번에 고치도록 하겠습니다.
    • overlayProvider를 하나로 통일하기
    • fsd에 맞지 않는 컴포넌트 이동하기
    • api 등 복잡한 디렉토리 논리적으로 세분화하기

Summary by CodeRabbit

  • 신규 기능

    • 홈 화면에 HeroSection, HomeNavigation, GameSection 등 다양한 위젯을 추가하여 구조화된 레이아웃을 제공합니다.
    • GameSection에서 기본 게임 목록을 불러와 카드 형태로 표시하며, 더보기 버튼을 통해 전체 게임 페이지로 이동할 수 있습니다.
    • GameSection 내 게임 카드 클릭 시 게임 상세 정보와 문제를 미리 볼 수 있는 모달이 표시되며, 게임 시작 기능을 제공합니다.
    • HeroSection에서 모두를 위한 가벼운 레크리에이션을 홍보하는 메시지를 보여줍니다.
    • HomeNavigation에서 로그인 상태에 따라 다른 버튼과 UI 요소가 표시됩니다.
    • React Query를 활용한 데이터 패칭 및 캐싱 기능이 추가되었습니다.
    • 전역 테마 및 오버레이 관리 기능이 개선되어 사용자 경험이 향상되었습니다.
  • 버그 수정

    • 불필요한 콘솔 로그가 제거되었습니다.

@kimnamheeee kimnamheeee linked an issue Aug 7, 2025 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Aug 7, 2025

Deploy Preview for super-zuccutto-b23df7 failed.

Name Link
🔨 Latest commit 70b44f9
🔍 Latest deploy log https://app.netlify.com/projects/super-zuccutto-b23df7/deploys/6894833f0b393d0008d6e2c9

@coderabbitai
Copy link

coderabbitai bot commented Aug 7, 2025

Walkthrough

새로운 홈 화면 구성을 위해 여러 위젯 컴포넌트(HomeNavigation, HeroSection, GameSection)가 도입되었고, React Query를 위한 전역 Provider가 추가되었습니다. 게임 목록을 불러오는 API와 목업 핸들러, 그리고 해당 데이터를 표시하는 UI 컴포넌트가 새롭게 구현되었습니다. 또한, RootLayoutProvidersOverlayProviderWrapper가 추가되어 전역 상태 및 오버레이 관리가 강화되었습니다.

Changes

Cohort / File(s) Change Summary
홈 레이아웃 및 Provider 구조 개선
service/app/src/app/layout.tsx, service/app/src/app/providers.tsx, service/app/src/app/overlayProvider.tsx
RootLayoutProvidersOverlayProviderWrapper를 추가하여 ThemeProvider를 감싸도록 구조 변경. React Query의 QueryClientProvider 설정과 오버레이 관리를 위한 OverlayProviderWrapper 도입.
홈 페이지 리팩토링 및 위젯 적용
service/app/src/app/page.tsx
기존 "Hello, World!"를 제거하고, HomeNavigation, HeroSection, GameSection 위젯으로 대체. 로그인 상태 플래그와 스타일 적용, 구간별 spacer 추가.
게임 API 및 목업 핸들러 추가
service/app/src/entities/game/api/getDefaultGame.ts, service/app/src/mocks/handlers/game.ts
/games/default 엔드포인트로 기본 게임 목록을 가져오는 API 함수 및 해당 목업 핸들러 추가. 에러 처리 및 응답 구조 정의.
게임 UI 컴포넌트 신규 도입
service/app/src/widgets/GameSection.tsx, service/app/src/entities/game/ui/components/gamePreview.tsx
GameSection: React Query로 기본 게임 목록 조회, 로딩/에러/성공 상태별 UI 렌더링 및 게임 상세 오버레이 제공.
GamePreview: 게임 상세 미리보기 UI, 질문 목록과 시작/닫기 기능 포함.
홈 위젯 신규 도입
service/app/src/widgets/HeroSection.tsx, service/app/src/widgets/HomeNavigation.tsx
HeroSection: 중앙 정렬된 소개 헤더 UI.
HomeNavigation: 로그인 여부에 따른 버튼 및 네비게이션 UI 분기, 라우팅 기능 포함.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HomePage
    participant GameSection
    participant getDefaultGame API
    participant MockHandler

    User->>HomePage: 접속
    HomePage->>GameSection: 렌더링
    GameSection->>getDefaultGame API: useQuery로 기본 게임 목록 요청
    getDefaultGame API->>MockHandler: /games/default GET 요청
    MockHandler-->>getDefaultGame API: 기본 게임 데이터 반환
    getDefaultGame API-->>GameSection: 게임 데이터 전달
    GameSection-->>User: 게임 카드 목록 렌더링
    User->>GameSection: 게임 카드 클릭
    GameSection->>getGameDetail API: 게임 상세 요청
    getGameDetail API-->>GameSection: 게임 상세 데이터 반환
    GameSection-->>User: 게임 상세 오버레이 표시
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

Possibly related PRs

Suggested labels

✨feature, 👩🏻‍💻frontend

Poem

🥕
새로운 홈 위젯들이 토끼굴에 쏙쏙,
게임 목록도 신나게 불러오네!
햇살처럼 밝은 HeroSection,
로그인 버튼도 깡총깡총.
React Query와 함께라면
오늘도 리뷰는 가볍게,
토끼도 춤추는 코딩의 봄!
🐇

Note

⚡️ Unit Test Generation is now available in beta!

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

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 65-create-layout-and-routing

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: 6

🧹 Nitpick comments (6)
service/app/src/widgets/HeroSection.tsx (1)

13-17: 접근성 개선을 위해 semantic HTML 구조를 고려해보세요.

현재 h1 태그에 br 요소로 줄바꿈을 하고 있는데, 이는 접근성 관점에서 개선할 여지가 있습니다. 스크린 리더 사용자에게 더 나은 경험을 제공할 수 있도록 CSS를 활용한 줄바꿈을 고려해보세요.

-        <h1 className="typography-heading-2xl-bold text-center text-neutral-black">
-          모두가 가볍게 즐길 수 있는
-          <br />
-          라이트 레크리에이션
-        </h1>
+        <h1 className="typography-heading-2xl-bold text-center text-neutral-black">
+          <span className="block">모두가 가볍게 즐길 수 있는</span>
+          <span className="block">라이트 레크리에이션</span>
+        </h1>
service/app/src/widgets/GameSection.tsx (1)

84-84: Array 생성 방식을 개선해보세요.

현재 방식도 동작하지만, 더 명시적인 방법을 사용할 수 있습니다.

-          ? Array.from({ length: 4 }).map((_, index) => (
+          ? Array.from({ length: 4 }, (_, index) => (
service/app/src/widgets/HomeNavigation.tsx (4)

23-23: 빈 이벤트 핸들러 구현이 필요합니다.

handleMyGamesClick 함수가 비어있습니다. 구현이 필요하거나 TODO 주석을 추가해주세요.

-  const handleMyGamesClick = () => {}
+  const handleMyGamesClick = () => {
+    // TODO: 내 게임 페이지로 이동 구현 필요
+    router.push("/my-games")
+  }

이런 식으로 구현하거나 TODO 주석을 추가하는 것이 좋겠습니다. 도움이 필요하면 말씀해 주세요.


29-29: 테마 토글 기능 구현이 필요합니다.

handleThemeToggle 함수가 비어있습니다. 테마 관련 context나 상태 관리가 필요합니다.


31-31: 아바타 클릭 핸들러 구현이 필요합니다.

handleAvatarClick 함수가 비어있습니다. 사용자 메뉴나 프로필 페이지 연결이 필요할 것 같습니다.


33-33: 로그인 기능 구현이 필요합니다.

handleLoginClick 함수가 비어있습니다. 카카오 로그인 연동이나 로그인 페이지 이동 로직이 필요합니다.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0dcfaa8 and 89caf17.

⛔ Files ignored due to path filters (3)
  • service/app/public/avatar.svg is excluded by !**/*.svg
  • service/app/public/kakao-logo.png is excluded by !**/*.png
  • service/app/public/logo.svg is excluded by !**/*.svg
📒 Files selected for processing (8)
  • service/app/src/app/layout.tsx (2 hunks)
  • service/app/src/app/page.tsx (1 hunks)
  • service/app/src/app/providers.tsx (1 hunks)
  • service/app/src/entities/game/api/getDefaultGame.ts (1 hunks)
  • service/app/src/mocks/handlers/game.ts (1 hunks)
  • service/app/src/widgets/GameSection.tsx (1 hunks)
  • service/app/src/widgets/HeroSection.tsx (1 hunks)
  • service/app/src/widgets/HomeNavigation.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
service/app/src/mocks/handlers/game.ts (1)
service/app/src/mocks/data/common.ts (2)
  • mockGameList (8-8)
  • internalServerError (5-6)
service/app/src/app/layout.tsx (1)
service/app/src/app/providers.tsx (1)
  • Providers (10-26)
service/app/src/widgets/HomeNavigation.tsx (3)
shared/design/src/components/button/primaryBoxButton.tsx (1)
  • PrimaryBoxButton (50-63)
shared/design/src/components/button/secondaryOutlineBoxButton.tsx (1)
  • SecondaryOutlineBoxButton (32-45)
shared/design/src/components/button/secondaryGhostIconButton.tsx (1)
  • SecondaryGhostIconButton (26-39)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci
🔇 Additional comments (10)
service/app/src/app/providers.tsx (1)

10-21: React Query 설정이 올바르게 구현되었습니다.

useState를 사용한 지연 초기화와 적절한 기본 옵션 설정이 잘 되어 있습니다. staleTime 60초와 retry 1회는 일반적인 사용 사례에 적합한 설정입니다.

service/app/src/app/layout.tsx (2)

8-8: Provider 통합이 적절하게 구현되었습니다.

새로운 Providers 컴포넌트 import가 올바르게 추가되었습니다.


30-34: Provider 계층 구조가 올바르게 설정되었습니다.

MSWComponent → Providers → ThemeProvider 순서로 래핑하여 React Query 컨텍스트가 전체 애플리케이션에서 사용 가능하도록 잘 구성되어 있습니다.

service/app/src/mocks/handlers/game.ts (1)

47-61: 기본 게임 목록 조회를 위한 mock handler가 적절하게 구현되었습니다.

다음 사항들이 잘 구현되어 있습니다:

  • mockGameList에서 처음 4개 게임을 반환하는 로직
  • 일관된 응답 구조 (result, error, data 필드)
  • 적절한 에러 핸들링 (try-catch with 500 status)
  • 기존 핸들러들과 동일한 패턴 사용
service/app/src/app/page.tsx (2)

1-3: 위젯 컴포넌트 import가 적절하게 구성되었습니다.

홈페이지 레이아웃을 위한 3개의 위젯 컴포넌트를 올바르게 import했습니다.


9-15: 레이아웃 구조가 잘 설계되었습니다.

컴포넌트 구성과 스타일링이 적절하며, 계층적인 레이아웃 구조가 명확합니다. 고정 높이 스페이서를 사용한 간격 조정도 합리적입니다.

service/app/src/entities/game/api/getDefaultGame.ts (1)

7-19: 기본 게임 조회 API 함수가 올바르게 구현되었습니다.

다음 사항들이 잘 구현되어 있습니다:

  • fetchClient 유틸리티를 사용한 일관된 HTTP 요청 처리
  • 적절한 에러 핸들링 (mapStatusToErrorResponse 활용)
  • 명확한 TypeScript 타입 정의 (ApiResponse<GameListData>)
  • 간단하고 집중된 책임 범위
service/app/src/widgets/HeroSection.tsx (1)

7-21: 컴포넌트 구조가 깔끔합니다.

Props 타이핑과 기본값 설정이 적절하고, Tailwind CSS 클래스 조합도 일관성 있게 잘 구현되어 있습니다.

service/app/src/widgets/GameSection.tsx (2)

22-33: React Query 설정이 적절합니다.

쿼리 키 설정, 스테일 타임(5분), 재시도 횟수(2회) 등이 합리적으로 구성되어 있습니다. 에러 처리 로직도 명확합니다.


82-102: 로딩 상태와 데이터 표시 로직이 잘 구현되어 있습니다.

스켈레톤 UI 구현과 실제 데이터 매핑이 적절하며, 반복 렌더링 최적화를 위한 key prop 사용도 올바릅니다.

import { HomeNavigation } from "../widgets/HomeNavigation"

export default function Home() {
const isLoggedIn = false
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

로그인 상태 관리 방식 개선이 필요합니다.

isLoggedIn이 하드코딩되어 있습니다. 실제 인증 상태를 반영하기 위해 인증 컨텍스트나 상태 관리를 통해 동적으로 설정하는 것을 권장합니다.

다음과 같이 인증 컨텍스트를 사용하는 방식으로 개선할 수 있습니다:

+import { useAuth } from '@/contexts/AuthContext'

export default function Home() {
- const isLoggedIn = false
+ const { isLoggedIn } = useAuth()
🤖 Prompt for AI Agents
In service/app/src/app/page.tsx at line 6, the isLoggedIn variable is hardcoded
to false, which does not reflect the actual user authentication state. Replace
this hardcoded value by integrating an authentication context or state
management solution to dynamically determine the login status. Use a context
provider or hook that supplies the current authentication state and update
isLoggedIn accordingly to ensure the UI reacts to real login status changes.

<section
className={`flex w-full flex-col items-center gap-[45px] ${className}`}
>
<div className="flex w-[952px] items-center justify-between">
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

반응형 디자인을 고려해보세요.

고정 너비 w-[952px]를 사용하고 있어 작은 화면에서 문제가 발생할 수 있습니다.

-        <div className="flex w-[952px] items-center justify-between">
+        <div className="flex w-full max-w-[952px] items-center justify-between px-4">
📝 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="flex w-[952px] items-center justify-between">
<div className="flex w-full max-w-[952px] items-center justify-between px-4">
🤖 Prompt for AI Agents
In service/app/src/widgets/GameSection.tsx at line 44, the fixed width class
w-[952px] is used, which can cause layout issues on smaller screens. Replace the
fixed width with responsive width classes such as max-w-full or use relative
units like percentages or flexbox properties to ensure the container adapts to
different screen sizes for better responsiveness.

<section
className={`flex w-full flex-col items-center gap-[45px] ${className}`}
>
<div className="flex w-[952px] items-center justify-between">
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

일관성을 위해 동일한 스타일 적용이 필요합니다.

성공 상태에서도 에러 상태와 동일한 반응형 스타일을 적용해야 합니다.

-        <div className="flex w-[952px] items-center justify-between">
+        <div className="flex w-full max-w-[952px] items-center justify-between px-4">
📝 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="flex w-[952px] items-center justify-between">
<div className="flex w-full max-w-[952px] items-center justify-between px-4">
🤖 Prompt for AI Agents
In service/app/src/widgets/GameSection.tsx at line 69, the div with className
"flex w-[952px] items-center justify-between" lacks consistent responsive
styling compared to the error state. Update this div's className to include the
same responsive styles used in the error state to ensure consistent appearance
and behavior across different states.

<nav
className={`flex h-[110px] w-full items-center justify-between bg-background-tertiary ${className}`}
>
<div className="flex w-[420px] items-center gap-2.5 px-10">
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

반응형 디자인 개선이 필요합니다.

고정 너비 w-[420px]를 사용하고 있어 작은 화면에서 레이아웃이 깨질 수 있습니다.

-      <div className="flex w-[420px] items-center gap-2.5 px-10">
+      <div className="flex min-w-0 flex-1 items-center gap-2.5 px-4 md:px-10">
📝 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="flex w-[420px] items-center gap-2.5 px-10">
<div className="flex min-w-0 flex-1 items-center gap-2.5 px-4 md:px-10">
🤖 Prompt for AI Agents
In service/app/src/widgets/HomeNavigation.tsx at line 39, the fixed width class
w-[420px] causes layout issues on small screens. Replace the fixed width with
responsive width classes such as max-w-full or use relative units like
percentages or flex-grow to ensure the container adapts to different screen
sizes and maintains a proper layout.

Comment on lines +40 to +48
<div className="flex h-[60px] w-[268px] cursor-pointer items-center justify-center p-3.5">
<Image
src="/logo.svg"
alt="홈 로고"
className="size-full"
width={268}
height={60}
/>
</div>
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

로고 이미지 접근성 개선이 필요합니다.

로고 클릭 시 홈으로 이동하는 기능과 적절한 접근성 속성이 필요합니다.

-        <div className="flex h-[60px] w-[268px] cursor-pointer items-center justify-center p-3.5">
+        <div 
+          className="flex h-[60px] w-[268px] cursor-pointer items-center justify-center p-3.5"
+          onClick={() => router.push("/")}
+          role="button"
+          tabIndex={0}
+          onKeyDown={(e) => {
+            if (e.key === 'Enter' || e.key === ' ') {
+              router.push("/")
+            }
+          }}
+        >
📝 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="flex h-[60px] w-[268px] cursor-pointer items-center justify-center p-3.5">
<Image
src="/logo.svg"
alt="홈 로고"
className="size-full"
width={268}
height={60}
/>
</div>
<div
className="flex h-[60px] w-[268px] cursor-pointer items-center justify-center p-3.5"
onClick={() => router.push("/")}
role="button"
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
router.push("/")
}
}}
>
<Image
src="/logo.svg"
alt="홈 로고"
className="size-full"
width={268}
height={60}
/>
</div>
🤖 Prompt for AI Agents
In service/app/src/widgets/HomeNavigation.tsx around lines 40 to 48, the logo
image lacks accessibility improvements and navigation functionality. Wrap the
logo image in a clickable element such as a link that navigates to the home
page. Add appropriate accessibility attributes like aria-label to describe the
link's purpose for screen readers, ensuring the logo is both accessible and
functional as a home navigation control.

</div>
</div>

<div className="flex w-[420px] flex-col items-end justify-center gap-2.5">
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

오른쪽 네비게이션 영역도 반응형으로 개선해주세요.

좌측과 마찬가지로 고정 너비 대신 반응형 클래스를 사용해주세요.

-      <div className="flex w-[420px] flex-col items-end justify-center gap-2.5">
+      <div className="flex min-w-0 flex-1 flex-col items-end justify-center gap-2.5">
📝 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="flex w-[420px] flex-col items-end justify-center gap-2.5">
<div className="flex min-w-0 flex-1 flex-col items-end justify-center gap-2.5">
🤖 Prompt for AI Agents
In service/app/src/widgets/HomeNavigation.tsx at line 51, the right navigation
area uses a fixed width class "w-[420px]" which is not responsive. Replace this
fixed width with responsive width classes such as "w-full" or use Tailwind's
responsive utilities like "max-w" or percentage widths to make the navigation
area adapt to different screen sizes, similar to how the left navigation is
handled.

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: 2

♻️ Duplicate comments (2)
service/app/src/widgets/GameSection.tsx (2)

85-85: 반응형 디자인 적용이 필요합니다.

고정 너비 사용으로 인해 작은 화면에서 레이아웃 문제가 발생할 수 있습니다.

-        <div className="flex w-[952px] items-center justify-between">
+        <div className="flex w-full max-w-[952px] items-center justify-between px-4">

110-110: 일관된 반응형 스타일 적용이 필요합니다.

에러 상태와 동일하게 반응형 스타일을 적용해야 합니다.

-      <div className="flex w-[952px] items-center justify-between">
+      <div className="flex w-full max-w-[952px] items-center justify-between px-4">
🧹 Nitpick comments (1)
service/app/src/entities/game/ui/components/gamePreview.tsx (1)

68-68: 사용하지 않는 변수 명명 규칙을 개선하세요.

사용하지 않는 변수는 _index 대신 _만 사용하는 것이 일반적입니다.

-          {questions.map((question, _index) => (
+          {questions.map((question, _) => (
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 89caf17 and 70b44f9.

📒 Files selected for processing (4)
  • service/app/src/app/layout.tsx (2 hunks)
  • service/app/src/app/overlayProvider.tsx (1 hunks)
  • service/app/src/entities/game/ui/components/gamePreview.tsx (1 hunks)
  • service/app/src/widgets/GameSection.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • service/app/src/app/layout.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - super-zuccutto-b23df7
  • GitHub Check: Header rules - super-zuccutto-b23df7
  • GitHub Check: Pages changed - super-zuccutto-b23df7
🔇 Additional comments (1)
service/app/src/app/overlayProvider.tsx (1)

1-11: 깔끔한 구현입니다!

OverlayProvider 래퍼 컴포넌트가 적절하게 구현되었습니다. TypeScript 인터페이스도 올바르게 정의되어 있습니다.

Comment on lines +67 to +77
<div className="flex items-center gap-[34px] overflow-x-auto">
{questions.map((question, _index) => (
<GameCard
key={question.id}
type={question.imageUrl ? "gamePreview" : "onlyTitleGamePreview"}
title={question.title}
questionCount={10}
imageUrl={question.imageUrl}
/>
))}
</div>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

하드코딩된 문제 개수를 수정해야 합니다.

GameCard 컴포넌트에 전달되는 questionCount가 10으로 하드코딩되어 있습니다. 실제 문제 개수나 인덱스를 사용해야 합니다.

-          {questions.map((question, _index) => (
+          {questions.map((question, index) => (
             <GameCard
               key={question.id}
               type={question.imageUrl ? "gamePreview" : "onlyTitleGamePreview"}
               title={question.title}
-              questionCount={10}
+              questionCount={index + 1}
               imageUrl={question.imageUrl}
             />
           ))}
📝 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="flex items-center gap-[34px] overflow-x-auto">
{questions.map((question, _index) => (
<GameCard
key={question.id}
type={question.imageUrl ? "gamePreview" : "onlyTitleGamePreview"}
title={question.title}
questionCount={10}
imageUrl={question.imageUrl}
/>
))}
</div>
<div className="flex items-center gap-[34px] overflow-x-auto">
{questions.map((question, index) => (
<GameCard
key={question.id}
type={question.imageUrl ? "gamePreview" : "onlyTitleGamePreview"}
title={question.title}
questionCount={index + 1}
imageUrl={question.imageUrl}
/>
))}
</div>
🤖 Prompt for AI Agents
In service/app/src/entities/game/ui/components/gamePreview.tsx around lines 67
to 77, the questionCount prop passed to GameCard is hardcoded as 10. Replace
this hardcoded value with the actual number of questions or the relevant count
from the question object to reflect the real problem count dynamically.

Comment on lines +42 to +78
const handleGameCardClick = async (game: GameListItem) => {
try {
const gameDetailRes = await getGameDetail(game.gameId)

if (gameDetailRes.result === "SUCCESS" && gameDetailRes.data) {
const gameDetail = gameDetailRes.data

overlay.open(({ close }) => {
const handleStartGame = () => {
close()
router.push(`/game/${game.gameId}`)
}

return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
<GamePreview
gameTitle={gameDetail.gameTitle}
creatorName={gameDetail.nickname}
questionCount={gameDetail.questionCount}
questions={gameDetail.questions.map((question) => ({
id: question.questionId.toString(),
title: question.questionText,
imageUrl: question.imageUrl,
}))}
onClose={close}
onStartGame={handleStartGame}
/>
</div>
)
})
} else {
console.error("Failed to fetch game detail")
}
} catch (error) {
console.error("Error fetching game detail:", error)
}
}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

게임 상세 정보 로딩 실패 시 사용자 피드백이 필요합니다.

현재 에러가 발생하면 콘솔에만 로그를 남기고 있어 사용자는 왜 모달이 열리지 않는지 알 수 없습니다. 토스트 메시지나 알림을 통해 사용자에게 피드백을 제공하세요.

     } catch (error) {
       console.error("Error fetching game detail:", error)
+      // 토스트 라이브러리를 사용하여 사용자에게 알림
+      // 예: toast.error("게임 정보를 불러올 수 없습니다. 잠시 후 다시 시도해주세요.")
     }

토스트 라이브러리가 프로젝트에 설정되어 있다면 구체적인 구현을 도와드릴 수 있습니다.

📝 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
const handleGameCardClick = async (game: GameListItem) => {
try {
const gameDetailRes = await getGameDetail(game.gameId)
if (gameDetailRes.result === "SUCCESS" && gameDetailRes.data) {
const gameDetail = gameDetailRes.data
overlay.open(({ close }) => {
const handleStartGame = () => {
close()
router.push(`/game/${game.gameId}`)
}
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
<GamePreview
gameTitle={gameDetail.gameTitle}
creatorName={gameDetail.nickname}
questionCount={gameDetail.questionCount}
questions={gameDetail.questions.map((question) => ({
id: question.questionId.toString(),
title: question.questionText,
imageUrl: question.imageUrl,
}))}
onClose={close}
onStartGame={handleStartGame}
/>
</div>
)
})
} else {
console.error("Failed to fetch game detail")
}
} catch (error) {
console.error("Error fetching game detail:", error)
}
}
} catch (error) {
console.error("Error fetching game detail:", error)
// 토스트 라이브러리를 사용하여 사용자에게 알림
// 예: toast.error("게임 정보를 불러올 수 없습니다. 잠시 후 다시 시도해주세요.")
}
🤖 Prompt for AI Agents
In service/app/src/widgets/GameSection.tsx around lines 42 to 78, when fetching
game details fails or returns an unsuccessful result, the code only logs errors
to the console without informing the user. To fix this, integrate a user-facing
feedback mechanism such as a toast notification or alert inside the catch block
and the else branch to notify the user that loading the game details failed. Use
the existing toast library in the project if available to display a clear error
message.

@kimnamheeee kimnamheeee self-assigned this Aug 7, 2025
@kimnamheeee kimnamheeee added ✨feature 구현, 개선 사항 관련 부분 👩🏻‍💻frontend 프론트엔드 작업 labels Aug 7, 2025
This was linked to issues Aug 7, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 22, 2025
@kimnamheeee kimnamheeee deleted the 65-create-layout-and-routing branch December 24, 2025 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨feature 구현, 개선 사항 관련 부분 👩🏻‍💻frontend 프론트엔드 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create game preview create layout and routing create home page

3 participants