Skip to content

Commit

Permalink
fix: Disable localeDetection in next-intl routing config (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
karolkarolka authored Dec 13, 2024
1 parent a91e041 commit df450ed
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions apps/storefront/src/i18n/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ export const localePrefixes: Record<
export const routing = defineRouting({
locales: SUPPORTED_LOCALES,
defaultLocale: DEFAULT_LOCALE,
localeDetection: false,
localePrefix: {
mode: "as-needed",
prefixes: localePrefixes,
},
});

const { redirect: _redirect } = createNavigation(routing);

// Help TypeScript detect unreachable code
export const redirect: typeof _redirect = _redirect;

export const { Link, usePathname, useRouter } = createNavigation(routing);
export const { Link, redirect, usePathname, useRouter } =
createNavigation(routing);

0 comments on commit df450ed

Please sign in to comment.