Client: no 'use client' on barrels, lazy lightbox viewer, rAF table of contents, Turnstile polling stops, reduced motion, Media eager, 404 placeholder option
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1d6108765c
commit
21073d98d0
@@ -174,6 +174,11 @@ export type NotFoundPageOptions =
|
||||
* carries the whole 404 page in every locale.
|
||||
*/
|
||||
load: (locale: string) => Promise<ReactNode>
|
||||
/**
|
||||
* What the lazy 404 shows until its content arrives (default nothing). A block as tall as the site's 404
|
||||
* content keeps the footer from moving when the content comes in (no layout shift, docs/performance.md).
|
||||
*/
|
||||
placeholder?: ReactNode
|
||||
}
|
||||
| ({ load?: undefined } & NotFoundViewOptions)
|
||||
|
||||
@@ -230,7 +235,7 @@ export function createNotFoundPage(helpers: NotFoundHelpers, options: NotFoundPa
|
||||
const locales = await localesOf(helpers)
|
||||
const defaultLocale = helpers.i18n?.defaultLocale ?? locales[0]
|
||||
if (options.load) {
|
||||
return <NotFoundLoader defaultLocale={defaultLocale} load={options.load} locales={locales} />
|
||||
return <NotFoundLoader defaultLocale={defaultLocale} load={options.load} locales={locales} placeholder={options.placeholder} />
|
||||
}
|
||||
const eager = options
|
||||
const views = Object.fromEntries(
|
||||
|
||||
Reference in New Issue
Block a user