Skip to content

reports 페이지 api 필드명 불일치 버그 수정 및 레이아웃 조정#271

Merged
kimnamheeee merged 4 commits into
devfrom
add-admin-layout
Jan 23, 2026
Merged

reports 페이지 api 필드명 불일치 버그 수정 및 레이아웃 조정#271
kimnamheeee merged 4 commits into
devfrom
add-admin-layout

Conversation

@kimnamheeee

@kimnamheeee kimnamheeee commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

📝 설명

🛠️ 주요 변경 사항

리뷰 시 고려해야 할 사항

Summary by CodeRabbit

릴리스 노트

  • 스타일

    • 관리자 보고서 페이지 레이아웃 개선
    • 보고서 테이블 스크롤 기능 강화
    • 페이지네이션 위치 최적화
  • 리팩토링

    • 관리자 레이아웃 구조 업데이트
    • 내부 데이터 모델 정규화

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 23, 2026

Copy link
Copy Markdown

워크스루

AdminLayout에서 children을 <main> 요소로 래핑하고, ReportedGamesTable 페이지의 레이아웃을 수직 스택으로 재구성했습니다. AdminReportsResponse의 report 필드를 content로 이름 변경하고, 이를 반영하도록 useAdminReports 훅과 mock 핸들러를 업데이트했습니다.

변경 사항

코호트 / 파일 변경 요약
레이아웃 및 스타일
service/app/src/app/admin/layout.tsx, service/app/src/app/admin/reports/page.tsx, service/app/src/widgets/admin/reported-games-table/ui/ReportedGamesTable.tsx
AdminLayout에 <main> 요소 추가 및 pt-[90px] 적용; 보고서 페이지 레이아웃을 수직 스택으로 재구성하고 페이지네이션을 하단으로 이동; 테이블 컨테이너에 overflow-y-auto 클래스 추가
데이터 모델 및 API
service/app/src/entities/report/model/types.ts, service/app/src/mocks/handlers/admin.ts
AdminReportsResponse 인터페이스의 report 필드를 content로 이름 변경
훅 업데이트
service/app/src/entities/report/hooks/useAdminReports.ts
데이터 매핑을 data?.report에서 data?.content로 변경

예상 코드 리뷰 노력

🎯 2 (Simple) | ⏱️ ~10 minutes

제안된 레이블

🐛bug, 👩🏻‍💻frontend

제안된 검토자

  • whdgur5717

🐰 필드명을 고쳐주고, 레이아웃도 쌓았네,
content로 report를 바꾸고 말야,
스크롤도 생기고 페이지도 내려가,
작은 수정들이 모여 큰 변화가,
깔끔한 구조로 더 나아가! 🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning PR 설명이 템플릿 구조만 제공되고 실제 내용이 작성되지 않았습니다. 모든 섹션이 비어있으며 코멘트만 존재합니다. 각 섹션에 구체적인 내용을 작성해주세요: 📝 설명 섹션에 작업 요약, 🛠️ 주요 변경 사항에 commit SHA와 함께 변경사항 명시, 리뷰 시 고려사항 작성(선택사항).
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용을 명확하게 요약하고 있습니다. API 필드명 불일치 버그 수정과 레이아웃 조정이라는 두 가지 핵심 변경 사항을 포함하고 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@service/app/src/entities/report/hooks/useAdminReports.ts`:
- Around line 36-37: In useAdminReports the expression data?.content.map(...)
can throw if data exists but content is undefined; change the construction that
builds games so it safely handles missing content by mapping over a guaranteed
array (e.g., use (data?.content ?? []) before calling map) when producing
ReportedGame[] for games and keep using mapAdminReportToReportedGame to
transform each report.
🧹 Nitpick comments (1)
service/app/src/app/admin/layout.tsx (1)

39-39: h-screenpt-[90px] 조합으로 인한 레이아웃 오버플로우 가능성

h-screen(100vh)에 pt-[90px]을 적용하면 실제 컨텐츠 영역이 뷰포트를 초과하여 불필요한 스크롤이 발생할 수 있습니다.

💡 대안 제안
-      <main className="h-screen pt-[90px]">{children}</main>
+      <main className="h-[calc(100vh-90px)] mt-[90px]">{children}</main>

또는 부모에 h-screenflex flex-col을 적용하고, <main>flex-1 overflow-hidden을 사용하는 방식도 고려해 보세요.

Comment on lines 36 to +37
const games: ReportedGame[] =
data?.report.map((report) => mapAdminReportToReportedGame(report)) ?? []
data?.content.map((report) => mapAdminReportToReportedGame(report)) ?? []

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

contentundefined일 경우 런타임 에러 발생 가능

data?.content.map(...)에서 data가 존재하지만 contentundefined인 경우 TypeError: Cannot read properties of undefined가 발생할 수 있습니다.

🛡️ 방어적 코딩 제안
  const games: ReportedGame[] =
-    data?.content.map((report) => mapAdminReportToReportedGame(report)) ?? []
+    data?.content?.map((report) => mapAdminReportToReportedGame(report)) ?? []
📝 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 games: ReportedGame[] =
data?.report.map((report) => mapAdminReportToReportedGame(report)) ?? []
data?.content.map((report) => mapAdminReportToReportedGame(report)) ?? []
const games: ReportedGame[] =
data?.content?.map((report) => mapAdminReportToReportedGame(report)) ?? []
🤖 Prompt for AI Agents
In `@service/app/src/entities/report/hooks/useAdminReports.ts` around lines 36 -
37, In useAdminReports the expression data?.content.map(...) can throw if data
exists but content is undefined; change the construction that builds games so it
safely handles missing content by mapping over a guaranteed array (e.g., use
(data?.content ?? []) before calling map) when producing ReportedGame[] for
games and keep using mapAdminReportToReportedGame to transform each report.

@github-actions

Copy link
Copy Markdown

Deploy preview for re-creation ready!

✅ Preview
https://re-creation-i3wd7ws7x-whdgur5717s-projects.vercel.app

Built with commit 1e27dfb.
This pull request is being automatically deployed with vercel-action

@kimnamheeee kimnamheeee merged commit f8d8c7e into dev Jan 23, 2026
2 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.

1 participant