fix: 헤더 메뉴 로케일 prefix 중복 수정#27
Conversation
- next-intl Link가 현재 로케일을 자동으로 붙이는데 navItems에서 /${locale}를 직접 넣어 en 전환 시 /en/en/cheer처럼 prefix가 중복됨
- href를 로케일 없는 경로로 바꿔 해결
- usePathname() 반환값과 형식이 맞아 기존에 정상 동작하지 않던 active도 정상화 처리
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesHeader 로케일 prefix 자동화
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
헤더 네비게이션에서 next-intl의 Link가 로케일 prefix를 자동 부여하는 동작을 고려해, 메뉴 링크가 /en/en/...처럼 중복 prefix를 만들던 문제를 해결하는 PR입니다. 또한 usePathname()과 href 형식을 일치시켜 활성(Active) 상태 표시가 정상 동작하도록 맞춥니다.
Changes:
navItems의href에서/${locale}prefix를 제거해 로케일 전환 시 중복 경로 생성을 방지- 로고(Link) 홈 이동 경로를 로케일 없는
"/"로 통일 pathname === item.href비교가 기대한 형태로 동작하도록 경로 형식 정리
Summary by CodeRabbit
릴리스 노트