Skip to content

Feat : not found#140

Merged
grimza99 merged 2 commits intodevfrom
feat/not-found
Oct 7, 2025
Merged

Feat : not found#140
grimza99 merged 2 commits intodevfrom
feat/not-found

Conversation

@grimza99
Copy link
Copy Markdown
Collaborator

@grimza99 grimza99 commented Oct 7, 2025

🔎 작업 사항

  • 문제를 찾을수 없거나 삭제된 문제를 url 로 접근할때 not-found.tsx 생성
  • 헤더의 프로필이 엑세스 토큰이 없는데도 나오는 부분 해결

❗️ 전달 사항

e.g. ) npm i 하세요 ...


➕ 관련 이슈

Summary by CodeRabbit

  • New Features
    • 문제 탭에 Not Found 화면 추가(삭제/수정 중 안내 및 문제 목록으로 이동 링크 제공).
  • Bug Fixes
    • 문제 상세 미존재 시 커스텀 오류 UI 대신 404 페이지로 처리.
    • 내비게이션 바에서 액세스 토큰과 사용자 정보가 모두 있을 때만 사용자 메뉴 표시.
    • 미인증 상태에서는 로그인 버튼만 노출하도록 정리.

@grimza99 grimza99 self-assigned this Oct 7, 2025
@grimza99 grimza99 merged commit c5160a0 into dev Oct 7, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

  • 문제 상세 탭 경로에 NotFound 페이지를 신규 추가.
  • 탭 페이지에서 데이터 미존재 시 콘솔/인라인 에러 대신 next/navigation의 notFound()로 전환.
  • 네비게이션 바 AuthActions에서 js-cookie로 accessToken을 읽어 사용자 메뉴 표시 조건을 user && accessToken로 변경하고 비인증 경로를 signin 버튼만으로 단순화.

Changes

Cohort / File(s) Summary
Problems 탭 404 처리
src/app/(auth)/(navigationsBarLayout)/problems/[problemId]/@tabs/page.tsx
notFound를 사용해 detailProblem 없음 시 404 트리거로 제어 흐름 변경; 인라인 에러 UI 및 콘솔 로그 제거.
Problems 탭 NotFound UI 추가
src/app/(auth)/(navigationsBarLayout)/problems/[problemId]/@tabs/not-found.tsx
문제 삭제/수정 중 메시지와 PATHS.PROBLEMS로 돌아가는 링크를 렌더하는 NotFound 컴포넌트 추가(기본 export).
네비게이션 바 인증 렌더링 변경
src/widgets/NavigationBar/ui/AuthActions.tsx
js-cookie 도입, cookies.get('accessToken')로 토큰 확인. 사용자 메뉴 표시 조건을 accessToken && user로 강화. 비인증 시 signup 분기 제거, signin 버튼만 표시.

Sequence Diagram(s)

sequenceDiagram
    actor U as User
    participant P as Problems Tabs Page
    participant S as Data Source
    participant R as Next.js Router
    participant NF as NotFound UI

    U->>P: 페이지 접속
    P->>S: 문제 상세 조회
    alt 데이터 존재
        S-->>P: detailProblem
        P-->>U: 탭 콘텐츠 렌더
    else 데이터 없음/삭제
        S-->>P: null/에러
        P->>R: notFound()
        R-->>U: 404 상태 전환
        U->>NF: NotFound UI 표시
    end
Loading
sequenceDiagram
    participant U as User
    participant NB as NavigationBar AuthActions
    participant C as js-cookie

    U->>NB: NavBar 렌더
    NB->>C: get('accessToken')
    alt accessToken && user
        NB-->>U: 사용자 메뉴 표시
    else
        NB-->>U: Sign in 버튼 표시
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

Possibly related PRs

Suggested labels

feat

Poem

바삭한 쿠키 한 조각, 토큰은 내 주머니! 🍪
길 잃은 문제엔 404, 살며시 돌아가기.
탭은 조용히 말하네, “잠시만요, 정비 중!”
로그인 토끼는 끄덕, “토큰과 나 함께라면.”
깡총! 새 흐름으로 오늘도 배포 끝.

✨ 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 feat/not-found

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97f6d80 and f116d2d.

📒 Files selected for processing (3)
  • src/app/(auth)/(navigationsBarLayout)/problems/[problemId]/@tabs/not-found.tsx (1 hunks)
  • src/app/(auth)/(navigationsBarLayout)/problems/[problemId]/@tabs/page.tsx (2 hunks)
  • src/widgets/NavigationBar/ui/AuthActions.tsx (3 hunks)

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 added the feat label Oct 7, 2025
@grimza99 grimza99 deleted the feat/not-found branch January 16, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant