-
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade
example-app-router-playground
and get rid of middleware war…
…nings by making sure the middleware doesn't import from anything React-specific
- Loading branch information
Showing
5 changed files
with
40 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import {Pathnames} from 'next-intl/navigation'; | ||
|
||
export const defaultLocale = 'en'; | ||
|
||
export const locales = ['en', 'de', 'es', 'ja'] as const; | ||
|
||
export const localePrefix = | ||
process.env.NEXT_PUBLIC_LOCALE_PREFIX === 'never' ? 'never' : 'as-needed'; | ||
|
||
export const pathnames = { | ||
'/': '/', | ||
'/client': '/client', | ||
'/client/redirect': '/client/redirect', | ||
'/nested': { | ||
en: '/nested', | ||
de: '/verschachtelt', | ||
es: '/anidada', | ||
ja: '/ネスト' | ||
}, | ||
'/redirect': '/redirect', | ||
'/news/[articleId]': { | ||
en: '/news/[articleId]', | ||
de: '/neuigkeiten/[articleId]', | ||
es: '/noticias/[articleId]', | ||
ja: '/ニュース/[articleId]' | ||
}, | ||
'/news/just-in': { | ||
en: '/news/just-in', | ||
de: '/neuigkeiten/aktuell', | ||
es: '/noticias/justo-en', | ||
ja: '/ニュース/現在' | ||
} | ||
} satisfies Pathnames<typeof locales>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters