-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
docs: Adapt examples for rootParams
#1619
base: feat/support-rootparams
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -12,7 +12,7 @@ | |||
}, | |||
"dependencies": { | |||
"clsx": "^2.1.1", | |||
"next": "^14.2.4", | |||
"next": "15.1.1-canary.12", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Revert once in stable
}; | ||
|
||
export default async function BaseLayout({children, locale}: Props) { | ||
// Inline? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Depends on whether a global not found page can be styled
it('renders', () => { | ||
// Disabled until canary version is reverted | ||
// eslint-disable-next-line jest/no-disabled-tests | ||
it.skip('renders', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Should be resolved once we use the same version across packages and examples
export default getRequestConfig(async () => { | ||
const params = await rootParams(); | ||
const locale = hasLocale(routing.locales, params.locale) | ||
? params.locale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
@@ -7,7 +7,7 @@ import type {Locale} from './AppConfig.tsx'; | |||
*/ | |||
export default function hasLocale<LocaleType extends Locale>( | |||
locales: ReadonlyArray<LocaleType>, | |||
candidate?: string | null | |||
candidate: unknown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A param can be string[]
rootParams
rootParams
Based on #1625
TODO
getTranslations({locale})
. Update async docs in general?i18n/request.ts
/unknown
working again when Next.js allows this