Skip to content

fix(service-web): resolve getLocale error in Client Components - #388

Merged
kang-heewon merged 2 commits into
trunkfrom
fix-getlocale-client-component
Sep 18, 2026
Merged

kang-heewon merged 2 commits into
trunkfrom
fix-getlocale-client-component

Conversation

@kang-heewon

Copy link
Copy Markdown
Member

Summary

  • Convert RankBadge from async server component (next-intl/server's getLocale) to synchronous component using useLocale() from next-intl
  • Fix runtime error getLocale is not supported in Client Components when RankBadge is rendered in client components (ProductItem, ProductCard)
  • Add RankBadge unit tests
  • Align unit test mocks with @darun/utils-router abstraction across affected tests

Verification

  • pnpm lint passed (67/67)
  • pnpm typecheck passed (67/67)
  • pnpm test passed (66/66)
  • pnpm --filter service-web build passed

- useLocale from next-intl instead of getLocale from next-intl/server in RankBadge
- add RankBadge unit tests
- fix @darun/utils-router mocks in affected test files
Copilot AI lite review requested due to automatic review settings September 18, 2026 15:24
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
darun-admin-web Ready Ready Preview Sep 18, 2026 3:25pm UTC
darun-visual-web Ready Ready Preview Sep 18, 2026 3:25pm UTC
darun-web Canceled Canceled Sep 18, 2026 3:25pm UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel
vercel Bot temporarily deployed to Preview – darun-admin-web September 18, 2026 15:24 Inactive
@kang-heewon
kang-heewon enabled auto-merge (squash) September 18, 2026 15:24
@sonarqubecloud

Copy link
Copy Markdown

@kang-heewon
kang-heewon merged commit 3d4b9c2 into trunk Sep 18, 2026
10 of 11 checks passed
@kang-heewon
kang-heewon deleted the fix-getlocale-client-component branch September 18, 2026 15:25

This branch was successfully deployed

2 active and 1 inactive deployments
Preview – darun-visual-web 01f0b7f1 Deployed Sep 18, 2026 by vercel[bot]
Preview – darun-web 01f0b7f1 Deployed Sep 18, 2026 by vercel[bot]
Preview – darun-admin-web 01f0b7f1 Deployed Sep 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants