docs: fix content shift in references (#13765)
This commit is contained in:
1 parent
ee2734c23d
commit
415d13091d
2 files changed
+10
-9
No files matched your search
@@ -16,13 +16,7 @@ export default async function ReferencesPage(props: PageProps) {
|
|||||||
const params = await props.params
|
const params = await props.params
|
||||||
const { slug } = params
|
const { slug } = params
|
||||||
|
|
||||||
return (
|
return <ReferenceMDX slug={slug} />
|
||||||
<Suspense fallback={<Loading />}>
|
|
||||||
<div className="animate animate-fadeIn">
|
|
||||||
<ReferenceMDX slug={slug} />
|
|
||||||
</div>
|
|
||||||
</Suspense>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function generateMetadata({
|
export async function generateMetadata({
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { MDXClientLazy, SerializeResult } from "next-mdx-remote-client/csr"
|
import { MDXClient, SerializeResult } from "next-mdx-remote-client/csr"
|
||||||
import MDXComponents from "../MDXComponents"
|
import MDXComponents from "../MDXComponents"
|
||||||
import { Loading, swrFetcher } from "docs-ui"
|
import { Loading, swrFetcher } from "docs-ui"
|
||||||
import useSWR from "swr"
|
import useSWR from "swr"
|
||||||
import { config } from "../../config"
|
import { config } from "../../config"
|
||||||
import { notFound } from "next/navigation"
|
import { notFound } from "next/navigation"
|
||||||
|
import { Suspense } from "react"
|
||||||
|
|
||||||
type ReferenceMDXProps = {
|
type ReferenceMDXProps = {
|
||||||
slug: string[]
|
slug: string[]
|
||||||
@@ -29,5 +30,11 @@ export const ReferenceMDX = ({ slug }: ReferenceMDXProps) => {
|
|||||||
return notFound()
|
return notFound()
|
||||||
}
|
}
|
||||||
|
|
||||||
return <MDXClientLazy {...serializedResult} components={MDXComponents} />
|
return (
|
||||||
|
<Suspense fallback={<Loading />}>
|
||||||
|
<div className="animate animate-fadeIn">
|
||||||
|
<MDXClient {...serializedResult} components={MDXComponents} />
|
||||||
|
</div>
|
||||||
|
</Suspense>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user