-
Notifications
You must be signed in to change notification settings - Fork 1
Revert "✨Feat: node page layout " #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,8 @@ | ||
| 'use client'; | ||
| import Image from 'next/image'; | ||
| import { boardData } from '@/shared/constants/main/boardData'; | ||
| import { useRouter } from 'next/router'; | ||
|
|
||
| const Boardgame = () => { | ||
| const router = useRouter(); | ||
| return ( | ||
| <div className='relative w-full h-full bg-[#46d1cd] overflow-hidden'> | ||
| <Image | ||
|
|
@@ -33,16 +31,7 @@ const Boardgame = () => { | |
| } | ||
|
|
||
| return ( | ||
| <div | ||
| key={key} | ||
| onClick={() => { | ||
| // TODO : 로그인 여부 체크 | ||
| router.push({ | ||
| pathname: '/main/Node', | ||
| query: { label: cell.label }, | ||
| }); | ||
| }} | ||
| ></div> | ||
| <div key={key} onClick={() => console.log(cell.label)}></div> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 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
fiLength 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 -150Length 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 -20Length 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 -40Length 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/nullLength of output: 1003 리버트 커밋으로 인한 의도된 네비게이션 제거 확인됨 - 하지만 console.log 제거 필요 이 변경은 "Revert '✨Feat: node page layout '" 커밋의 일부로서 의도된 것입니다. 그러나 onClick 핸들러의
🤖 Prompt for AI Agents |
||
| ); | ||
| }), | ||
| )} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,10 @@ import { cn } from '@/shared/lib'; | |
| import StampBoard from './components/stampBoard/StampBoard'; | ||
| import { ControlBar } from '@/shared/components'; | ||
| import Image from 'next/image'; | ||
| import { useRouter } from 'next/router'; | ||
| import router from 'next/router'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 잘못된 라우터 사용 패턴으로 런타임 오류가 발생합니다.
다음과 같이 수정하세요: -import router from 'next/router';
+import { useRouter } from 'next/router';
export default function MainPage() {
+ const router = useRouter();
+
return (
<divAlso applies to: 34-36 🤖 Prompt for AI Agents |
||
| import { BottomNav } from '@/shared/components/tab/BottomNav'; | ||
|
|
||
| export default function MainPage() { | ||
| const router = useRouter(); | ||
| return ( | ||
| <div | ||
| className={cn( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,6 @@ export const iconNames = [ | |
| "KakaoIcon", | ||
| "MapPin", | ||
| "MapPin_", | ||
| "PressStamp", | ||
| "Save", | ||
| "Stamp", | ||
| "User", | ||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
잘못된 라우터 사용 패턴으로 런타임 오류가 발생합니다.
Next.js는
router를 default export로 제공하지 않습니다.next/router에서 default import한router는undefined이거나 사용할 수 없는 객체이므로router.back()호출 시 런타임 에러가 발생합니다.Next.js 15 (Pages Router)에서는 반드시
useRouter훅을 사용해야 합니다.다음과 같이 수정하세요:
📝 Committable suggestion
🤖 Prompt for AI Agents