Skip to content

fix(core): pass searchParams when swapping locales#2362

Merged
jorgemoya merged 1 commit into
canaryfrom
fix-locales-search-params
Jun 3, 2025
Merged

fix(core): pass searchParams when swapping locales#2362
jorgemoya merged 1 commit into
canaryfrom
fix-locales-search-params

Conversation

@jorgemoya

Copy link
Copy Markdown
Contributor

What/Why?

Noticed that when we switch locales, we lose the search params selection. In some cases (like compare and PDP), we want search params to be retained.

Testing

Locally tested that the search params remain.

Migration

Modify useSwitchLocale hook to include Object.fromEntries(searchParams.entries()).

@jorgemoya
jorgemoya requested a review from a team June 3, 2025 17:03
@changeset-bot

changeset-bot Bot commented Jun 3, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 354f4e7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 3, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-canary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 5:17pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Jun 3, 2025 5:17pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 5:17pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 5:17pm

@jorgemoya
jorgemoya added this pull request to the merge queue Jun 3, 2025
Merged via the queue into canary with commit 5b83a97 Jun 3, 2025
9 checks passed
@jorgemoya
jorgemoya deleted the fix-locales-search-params branch June 3, 2025 23:17
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.

4 participants