Skip to content

[DP-421] 마이페이지 로그인 가드 구현#122

Merged
uiuuoq merged 1 commit into
developV2from
feature/DP-421-login-guard
May 1, 2026
Merged

[DP-421] 마이페이지 로그인 가드 구현#122
uiuuoq merged 1 commit into
developV2from
feature/DP-421-login-guard

Conversation

@uiuuoq
Copy link
Copy Markdown
Collaborator

@uiuuoq uiuuoq commented May 1, 2026

연결된 Jira 티켓

  • DP-421

작업 내용

  • 비로그인 상태에서 마이페이지 접근 시 로그인 유도 UI 표시
  • 마이페이지 하위 페이지 URL 직접 접근 차단

주요 변경점

  • app/(main)/my-page/page.tsx: 리포트/히스토리와 동일한 인증 가드 패턴 적용
    • 미인증 시 LoginRequiredEmptyState 표시
    • !mounted || !isInitialized 동안 null 반환으로 깜빡임 방지
  • app/(main)/my-page/layout.tsx 신규 생성: 하위 6개 페이지 일괄 보호
    • 미인증 시 router.replace('/my-page')로 리다이렉트
    • usePathname으로 메인/하위 페이지 분기 처리

테스트 방법

  1. 비로그인 상태에서 /my-page 접속 → 로그인 필요 UI 노출 확인
  2. 비로그인 상태에서 /my-page/scraps, /my-page/wrong-quizzes, /my-page/recommend/* URL 직접 입력 → /my-page로 리다이렉트 확인
  3. 로그인 후 마이페이지 정상 접근 확인

AI 사용 여부

  • Claude Code 사용

체크리스트

  • 빌드/테스트 확인
  • 리뷰어 지정
  • 라벨 지정

@uiuuoq uiuuoq added enhancement New feature or request automerge Enables auto-merge for this PR after successful CI/CD checks labels May 1, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

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

Project Deployment Actions Updated (UTC)
traceapp Ready Ready Preview, Comment May 1, 2026 3:53am

@uiuuoq uiuuoq merged commit 95ad7c7 into developV2 May 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Enables auto-merge for this PR after successful CI/CD checks enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant