Skip to content

Revert "✨Feat: node page layout "#73

Closed
jjangminii wants to merge 1 commit intodevelopfrom
revert-56-feat/#55/node-page-layout
Closed

Revert "✨Feat: node page layout "#73
jjangminii wants to merge 1 commit intodevelopfrom
revert-56-feat/#55/node-page-layout

Conversation

@jjangminii
Copy link
Copy Markdown
Contributor

@jjangminii jjangminii commented Oct 29, 2025

Reverts #56

Summary by CodeRabbit

릴리스 노트

  • 제거된 기능

    • 노드 페이지 제거
  • 리팩토링

    • 라우터 처리 방식 개선
    • 아이콘 라이브러리 확장 (새로운 아이콘 추가)
    • 위치 기반 기능 조정

@vercel
Copy link
Copy Markdown

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
af-fe Ready Ready Preview Comment Oct 29, 2025 0:22am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 29, 2025

PR 분석 요약

Walkthrough

라우터 훅 사용 패턴을 리팩토링하고, Node.tsx 페이지와 getLocation 유틸리티 함수를 제거했으며, PressStamp 아이콘을 삭제하고 새로운 아이콘 임포트를 추가하는 변경사항입니다.

Changes

Cohort / File(s) 변경 요약
라우터 훅 리팩토링
src/pages/main/Board.tsx, src/pages/main/index.tsx
useRouter 훅 임포트를 next/router의 기본 라우터 임포트로 변경하고, 훅 호출 없이 임포트된 라우터 인스턴스를 직접 사용합니다.
보드 컴포넌트 수정
src/pages/main/components/board/Boardgame.tsx
useRouter 임포트 제거 및 셀 클릭 핸들러에서 라우트 푸시 동작을 콘솔 로깅으로 변경합니다.
페이지 삭제
src/pages/main/Node.tsx
전체 Node.tsx 페이지 컴포넌트 파일을 삭제합니다.
아이콘 관리
src/shared/icons/iconNames.ts, src/shared/icons/index.ts
iconNames 배열에서 "PressStamp" 제거 및 PressStamp.svg 임포트 삭제, backto.svg, Check.svg, CopySimple.svg, Export.svg, FadersHorizontal.svg, GoogleIcon.svg, HeartStraight.svg 임포트 추가합니다.
유틸리티 함수 삭제
src/shared/utils/handleGetLocation.ts
지리정보 위치 조회 기능을 제공하던 getLocation 유틸리티 함수를 전체 제거합니다.

코드 리뷰 예상 난이도

🎯 3 (보통) | ⏱️ ~20분

추가 검토 대상:

  • Node.tsx 페이지 삭제에 대한 연관성 확인 (다른 곳에서 참조하는지 검증)
  • Board.tsx와 index.tsx의 라우터 임포트 패턴 변경이 SSR 환경에서 정상 작동하는지 확인
  • getLocation 함수 제거로 인한 지리정보 기능 완전 제거 여부 확인
  • 새로운 아이콘들이 모두 실제 사용되는지 검증

관련 가능 PR

  • ✨Feat: node page layout  #56: 동일한 컴포넌트 및 유틸리티(Board.tsx, Node.tsx, Boardgame.tsx, handleGetLocation.ts, iconNames.ts)를 반대 방향으로 수정하는 PR과 직접 연관됨
  • ✨Feat: main페이지 board판 #51: 동일한 파일(Board.tsx, Boardgame.tsx, index.tsx)의 라우팅 및 보드 컴포넌트 변경사항이 중첩됨

제안 라벨

fix

제안 리뷰어

  • skyblue1232
  • KongMezu

🐰 변경을 축하하는 토끼의 시

라우터를 정리하고 🧹
남은 페이지 지우고
새 아이콘들 담아
낡은 위치 함수는 안녕
깔끔한 코드 만들어낸다 ✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning PR 설명이 제공된 템플릿을 따르지 않고 있습니다. 필수 섹션인 "🔥 작업 내용", "🤔 추후 작업 사항", "🔗 이슈", "PR Point (To Reviewer)", "📸 피그마 스크린샷" 중 어느 것도 채워져 있지 않습니다. 현재 설명은 단 한 줄 "Reverts #56"로만 구성되어 있으며, 이는 최소한의 정보만 제공합니다. Revert PR이라도 템플릿의 기본 구조를 따르고 작업 내용과 이슈 참조를 명확히 해야 합니다. PR 설명을 템플릿에 맞게 작성해주시기 바랍니다. 최소한 다음 항목들을 포함해 주세요: 🔥 작업 내용 섹션에 어떤 기능이 되돌려지는지 명시, 🔗 이슈 섹션에 관련 이슈 #56 및 close 명령어 포함, PR Point 섹션에 검토자를 위한 주요 사항 안내. Revert PR이므로 간결하게 작성할 수 있지만, 제공된 템플릿 구조는 유지해주시기 바랍니다.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed 제목 "Revert "✨Feat: node page layout""은 이 PR의 주요 목적을 명확하게 나타냅니다. 변경 사항 요약에서 Node.tsx 파일 삭제, 여러 라우터 훅 제거, 아이콘 및 유틸리티 함수 삭제 등이 확인되며, 이는 모두 이전에 추가된 "node page layout" 기능을 되돌리는 작업과 일치합니다. 제목이 구체적이고 명확하게 의도를 전달하고 있습니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-56-feat/#55/node-page-layout

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.

@github-actions github-actions bot added the comment 필요한 주석 추가 및 변경 label Oct 29, 2025
@github-actions
Copy link
Copy Markdown

🏷️ Labeler has automatically applied labels based on your PR title, branch name, or commit message.
Please verify that they are correct before merging.

@jjangminii jjangminii closed this Oct 29, 2025
Copy link
Copy Markdown
Contributor

@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: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2872cc2 and e91d75b.

⛔ Files ignored due to path filters (1)
  • src/shared/icons/source/PressStamp.svg is excluded by !**/*.svg
📒 Files selected for processing (7)
  • src/pages/main/Board.tsx (1 hunks)
  • src/pages/main/Node.tsx (0 hunks)
  • src/pages/main/components/board/Boardgame.tsx (1 hunks)
  • src/pages/main/index.tsx (1 hunks)
  • src/shared/icons/iconNames.ts (0 hunks)
  • src/shared/icons/index.ts (1 hunks)
  • src/shared/utils/handleGetLocation.ts (0 hunks)
💤 Files with no reviewable changes (3)
  • src/shared/icons/iconNames.ts
  • src/shared/utils/handleGetLocation.ts
  • src/pages/main/Node.tsx
🔇 Additional comments (1)
src/shared/icons/index.ts (1)

1-2: 생성 스크립트를 실행하여 자동 생성 파일을 재생성해주세요.

검증 결과, git diff에서 확인된 변경 패턴(1a2, 15d15, 19d18)은 특정 라인 단위의 수정으로, generate-icon-list.ts 스크립트 실행 시 발생하는 전체 파일 재작성과 다릅니다. 이는 파일을 수동으로 수정했음을 시사합니다.

현재 상태는 index.tsiconNames.ts 간 일관성이 유지되어 있으나, 자동 생성 파일의 정확한 유지보수를 위해 다음을 권장합니다:

npm run generate:icons  # 또는 해당 스크립트 명령어

이를 통해 SVG 소스 파일에서 직접 생성하면 향후 파일 동기화 이슈를 방지할 수 있습니다.

Comment on lines +4 to 9
import router from 'next/router';

const Board = () => {
const router = useRouter();
return (
<div className='relative w-full h-[100vh] bg-[#46d1cd] overflow-auto'>
<Header title='지도' onClick={() => router.back()} />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

잘못된 라우터 사용 패턴으로 런타임 오류가 발생합니다.

Next.js는 router를 default export로 제공하지 않습니다. next/router에서 default import한 routerundefined이거나 사용할 수 없는 객체이므로 router.back() 호출 시 런타임 에러가 발생합니다.

Next.js 15 (Pages Router)에서는 반드시 useRouter 훅을 사용해야 합니다.

다음과 같이 수정하세요:

-import router from 'next/router';
+import { useRouter } from 'next/router';

 const Board = () => {
+  const router = useRouter();
+
   return (
     <div className='relative w-full h-[100vh] bg-[#46d1cd] overflow-auto'>
       <Header title='지도' onClick={() => router.back()} />
📝 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
import router from 'next/router';
const Board = () => {
const router = useRouter();
return (
<div className='relative w-full h-[100vh] bg-[#46d1cd] overflow-auto'>
<Header title='지도' onClick={() => router.back()} />
import { useRouter } from 'next/router';
const Board = () => {
const router = useRouter();
return (
<div className='relative w-full h-[100vh] bg-[#46d1cd] overflow-auto'>
<Header title='지도' onClick={() => router.back()} />
🤖 Prompt for AI Agents
In src/pages/main/Board.tsx around lines 4 to 9, the file imports a default
router from 'next/router' and calls router.back(), which causes a runtime error
because Next.js requires the useRouter hook; replace the default import with a
named import of useRouter from 'next/router', call const router = useRouter() at
the top of the Board component, and then use router.back() (or router.back in an
event handler) so the router instance is obtained via the React hook.

});
}}
></div>
<div key={key} onClick={() => console.log(cell.label)}></div>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

네비게이션 기능이 완전히 제거되었습니다.

활성 셀 클릭 시 페이지 이동 대신 콘솔 로그만 출력하도록 변경되어, 사용자에게는 클릭해도 아무 반응이 없는 것처럼 보입니다. 이것이 의도된 동작인지 확인이 필요합니다.

이 변경이 의도된 것인지, 아니면 다른 네비게이션 방식으로 대체해야 하는지 확인해주세요.


🏁 Script executed:

#!/bin/bash
# Examine Boardgame.tsx to verify current state
echo "=== Checking Boardgame.tsx content ==="
if [ -f "src/pages/main/components/board/Boardgame.tsx" ]; then
  cat "src/pages/main/components/board/Boardgame.tsx"
else
  echo "File not found at expected location"
  find . -name "Boardgame.tsx" -type f 2>/dev/null | head -5
fi

Length of output: 1060


🏁 Script executed:

#!/bin/bash
# Check for useRouter imports in the file
echo "=== Checking for router imports ==="
rg -n "useRouter|router\.push|import.*router" src/pages/main/components/board/Boardgame.tsx 2>/dev/null || echo "No router-related patterns found"

Length of output: 68


🏁 Script executed:

#!/bin/bash
# Check git diff to understand what changed
echo "=== Checking git diff for the file ==="
git diff HEAD -- src/pages/main/components/board/Boardgame.tsx 2>/dev/null | head -100 || echo "Git diff not available"

Length of output: 38


🏁 Script executed:

#!/bin/bash
# Look at surrounding context around line 34
echo "=== Context around line 34 ==="
sed -n '25,45p' src/pages/main/components/board/Boardgame.tsx 2>/dev/null || echo "Cannot access line range"

Length of output: 451



🏁 Script executed:

#!/bin/bash
# Check git log history for this file
echo "=== Git log for Boardgame.tsx ==="
git log --oneline -20 -- src/pages/main/components/board/Boardgame.tsx 2>/dev/null | head -10

echo -e "\n=== Recent commits showing the file ==="
git log -p --follow -3 -- src/pages/main/components/board/Boardgame.tsx 2>/dev/null | head -150

Length of output: 313


🏁 Script executed:

#!/bin/bash
# Search for router usage in similar board/game files
echo "=== Checking for router patterns in related files ==="
rg -n "router\.push|useRouter" src/pages/main/components/board/ src/pages/main/components/ 2>/dev/null | head -20

echo -e "\n=== Looking for onClick handlers with navigation ==="
rg -n "onClick.*router|onClick.*push" src/pages/main/components/ 2>/dev/null | head -20

Length of output: 107


🏁 Script executed:

#!/bin/bash
# Check PR metadata or description
echo "=== Checking for PR or commit message context ==="
git log -1 --pretty=format:"%B" 2>/dev/null

echo -e "\n=== Current branch info ==="
git branch -v 2>/dev/null || echo "Not in git context"

Length of output: 258


🏁 Script executed:

#!/bin/bash
# Check git log history
echo "=== Git log for Boardgame.tsx ==="
git log --oneline -10 -- src/pages/main/components/board/Boardgame.tsx 2>/dev/null || echo "No git history"

echo -e "\n=== Recent commits ==="
git log -1 --pretty=format:"%B" 2>/dev/null || echo "No commit message"

Length of output: 330


🏁 Script executed:

#!/bin/bash
# Search for router usage in board/game related files
echo "=== Router patterns in board components ==="
rg -n "router\.push|useRouter|onClick.*router" src/pages/main/components/board/ -A2 -B2 2>/dev/null || echo "No router patterns found"

echo -e "\n=== onClick handlers in board components ==="
rg -n "onClick" src/pages/main/components/board/ -B1 -A1 2>/dev/null | head -40

Length of output: 373


🏁 Script executed:

#!/bin/bash
# Check boardData structure to understand intent
echo "=== Checking boardData constants ==="
cat src/shared/constants/main/boardData.ts 2>/dev/null || cat src/shared/constants/main/boardData.js 2>/dev/null || find . -name "boardData*" -type f 2>/dev/null

Length of output: 1003


리버트 커밋으로 인한 의도된 네비게이션 제거 확인됨 - 하지만 console.log 제거 필요

이 변경은 "Revert '✨Feat: node page layout '" 커밋의 일부로서 의도된 것입니다. 그러나 onClick 핸들러의 console.log(cell.label)은 프로덕션 코드에서 제거되어야 합니다. 현재는 사용자에게 보이는 효과가 없는 디버그 코드만 남아있습니다.

  • Line 34: console.log(cell.label) 제거 또는 용도 명확화 필요
🤖 Prompt for AI Agents
In src/pages/main/components/board/Boardgame.tsx around line 34, the onClick
handler currently only calls console.log(cell.label) which is leftover debug
code from the revert; remove the console.log from the handler — either delete
the onClick prop entirely if clicks should be no-op, or replace it with the
intended navigation/handler (e.g., call the real click handler or router
navigation) and ensure no console.* calls remain in production.

import { ControlBar } from '@/shared/components';
import Image from 'next/image';
import { useRouter } from 'next/router';
import router from 'next/router';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

잘못된 라우터 사용 패턴으로 런타임 오류가 발생합니다.

Board.tsx와 동일한 문제입니다. Next.js는 router를 default export로 제공하지 않으므로, 현재 코드는 보드판 클릭 시 페이지 이동이 실패하고 런타임 에러가 발생합니다.

다음과 같이 수정하세요:

-import router from 'next/router';
+import { useRouter } from 'next/router';

 export default function MainPage() {
+  const router = useRouter();
+
   return (
     <div

Also applies to: 34-36

🤖 Prompt for AI Agents
In src/pages/main/index.tsx around line 5 (and also affecting lines 34-36), the
file incorrectly imports router as a default export from 'next/router', causing
runtime errors when navigating; replace the default import with the useRouter
hook (import { useRouter } from 'next/router') and obtain router inside the
component (const router = useRouter()) before calling router.push or other
navigation methods, then update the code at lines 34-36 to use that local router
instance for navigation.

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

Labels

comment 필요한 주석 추가 및 변경

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant