Skip to content

[fix/notepage-bug] 노트 페이지 버그 수정#163

Merged
join0life merged 5 commits into
developfrom
fix/notepage-bug
May 27, 2026
Merged

[fix/notepage-bug] 노트 페이지 버그 수정#163
join0life merged 5 commits into
developfrom
fix/notepage-bug

Conversation

@join0life

Copy link
Copy Markdown
Contributor

무엇을 변경했나요?

  • 노트 생성/수정 시 노트 상세 페이지로 리다이렉트 후 노트 목록으로 이동하면 노트 목록 페이지가 동작하지 않는 버그가 있어 수정
    • 생성/수정 후 + modal 닫을 때 router.push -> replace로 수정
    • @modal에 기본 페이지 추가

왜 이렇게 했나요?

  • 노트 생성/수정 후 이동 및 모달 닫기에 push 대신 replace를 사용한 이유: push는 히스토리를 남겨 뒤로가기 시 닫힌 모달이나 작성/수정 화면으로 다시 돌아갈 수 있어, 현재 경로를 교체하는 replace가 더 적합하다고 판단
  • 기본 페이지 추가한 이유: 기존에는 fallback 페이지밖에 없었어서 오류가 난 것

리뷰어가 특히 봐줬으면 하는 부분

  • (예: 이 로직이 엣지케이스를 잘 처리하는지)

스크린샷 (UI 변경 시)

@join0life join0life self-assigned this May 27, 2026
@join0life join0life added the bug Something isn't working label May 27, 2026
@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
bearlog Ready Ready Preview, Comment May 27, 2026 3:03am

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request replaces router.push with router.replace across several components and hooks to prevent back-button issues after note actions. It also renames the close handler prop on NoteCloseButton to onCloseAction. The review feedback highlights a potential missing replacement in the note creation hook (usePostNote), suggests using template literals for consistency in the layout file, and recommends adding defensive checks for goalId to prevent invalid navigation.

Comment thread src/shared/lib/query/mutations.ts
Comment thread src/app/(main)/goal/[goalId]/note/[noteId]/(detail)/layout.tsx
Comment thread src/features/note/components/NoteDetailModal/index.tsx
@join0life join0life merged commit 2173638 into develop May 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants