1- import { source } from '@/lib/source' ;
2- import {
3- DocsPage ,
4- DocsBody ,
5- DocsDescription ,
6- DocsTitle ,
7- } from 'fumadocs-ui/page' ;
8- import { notFound } from 'next/navigation' ;
9- import { createRelativeLink } from 'fumadocs-ui/mdx' ;
10- import { getMDXComponents } from '@/mdx-components' ;
1+ import { source } from "@/lib/source"
2+ import { DocsPage , DocsBody , DocsDescription , DocsTitle } from "fumadocs-ui/page"
3+ import { notFound } from "next/navigation"
4+ import { createRelativeLink } from "fumadocs-ui/mdx"
5+ import { getMDXComponents } from "@/mdx-components"
116
12- export default async function Page ( props : {
13- params : Promise < { slug ?: string [ ] } > ;
14- } ) {
15- const params = await props . params ;
16- const page = source . getPage ( params . slug ) ;
17- if ( ! page ) notFound ( ) ;
7+ export default async function Page ( props : { params : Promise < { slug ?: string [ ] } > } ) {
8+ const params = await props . params
9+ const page = source . getPage ( params . slug )
10+ if ( ! page ) notFound ( )
1811
19- const MDXContent = page . data . body ;
12+ const MDXContent = page . data . body
2013
2114 return (
2215 < DocsPage toc = { page . data . toc } full = { page . data . full } >
@@ -31,22 +24,20 @@ export default async function Page(props: {
3124 />
3225 </ DocsBody >
3326 </ DocsPage >
34- ) ;
27+ )
3528}
3629
3730export async function generateStaticParams ( ) {
38- return source . generateParams ( ) ;
31+ return source . generateParams ( )
3932}
4033
41- export async function generateMetadata ( props : {
42- params : Promise < { slug ?: string [ ] } > ;
43- } ) {
44- const params = await props . params ;
45- const page = source . getPage ( params . slug ) ;
46- if ( ! page ) notFound ( ) ;
34+ export async function generateMetadata ( props : { params : Promise < { slug ?: string [ ] } > } ) {
35+ const params = await props . params
36+ const page = source . getPage ( params . slug )
37+ if ( ! page ) notFound ( )
4738
4839 return {
4940 title : page . data . title ,
5041 description : page . data . description ,
51- } ;
42+ }
5243}
0 commit comments