Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core): bump next-intl #1491

Merged
merged 3 commits into from
Oct 21, 2024
Merged

chore(core): bump next-intl #1491

merged 3 commits into from
Oct 21, 2024

Conversation

jorgemoya
Copy link
Contributor

What/Why?

Testing

Locally, redirecting on default locale will not append the default locale, just like Links.
Updated tests to match this behavior.

Copy link

changeset-bot bot commented Oct 21, 2024

🦋 Changeset detected

Latest commit: ecff89e

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 Minor

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

Copy link

vercel bot commented Oct 21, 2024

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

Name Status Preview Comments Updated (UTC)
catalyst 🔄 Building (Inspect) Visit Preview 💬 Add feedback Oct 21, 2024 6:01pm
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 21, 2024 6:01pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst-1millionproducts-store ⬜️ Ignored (Inspect) Visit Preview Oct 21, 2024 6:01pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Oct 21, 2024 6:01pm
catalyst-test-store ⬜️ Ignored (Inspect) Visit Preview Oct 21, 2024 6:01pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Oct 21, 2024 6:01pm
catalyst-unstable ⬜️ Ignored (Inspect) Visit Preview Oct 21, 2024 6:01pm

import { redirect } from '~/i18n/routing';

const canonicalDomain: string = process.env.BIGCOMMERCE_GRAPHQL_API_DOMAIN ?? 'mybigcommerce.com';
const BIGCOMMERCE_STORE_HASH = process.env.BIGCOMMERCE_STORE_HASH;
const ENABLE_ADMIN_ROUTE = process.env.ENABLE_ADMIN_ROUTE;

export const GET = () => {
const locale = useLocale();
Copy link
Member

Choose a reason for hiding this comment

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

Can we use getLocale here?

@@ -8,6 +10,10 @@ import { permanentRedirect } from '~/i18n/routing';
* on /xmlsitemap.php
*/

export const GET = () => permanentRedirect('/sitemap.xml');
export const GET = () => {
const locale = useLocale();
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@jorgemoya
Copy link
Contributor Author

Reported this issue from working on this: amannn/next-intl#1438

@jorgemoya
Copy link
Contributor Author

I had to pass default locale for these redirect in routes since next-intl does not work here.

@jorgemoya jorgemoya added this pull request to the merge queue Oct 21, 2024
Merged via the queue into main with commit 313a591 Oct 21, 2024
13 checks passed
@jorgemoya jorgemoya deleted the bump-next-intl branch October 21, 2024 21:45
@github-actions github-actions bot mentioned this pull request Oct 21, 2024
Copy link
Contributor

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-latest-3y8sa2rdi-bigcommerce-platform.vercel.app

🖥️ Desktop

We ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:

Category Score
🟠 Performance 81
🟢 Accessibility 100
🟢 Best practices 100
🟠 SEO 82

📱 Mobile

We ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:

Category Score
🟢 Performance 99
🟢 Accessibility 100
🟢 Best practices 100
🟠 SEO 85

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.

redirect does not respect as-needed locale prefix
3 participants