@@ -4,62 +4,62 @@ import { AutoTypeTable } from "fumadocs-typescript/ui"
4
4
import { Tab , Tabs } from "fumadocs-ui/components/tabs"
5
5
import defaultMdxComponents from "fumadocs-ui/mdx"
6
6
import {
7
- DocsBody ,
8
- DocsDescription ,
9
- DocsPage ,
10
- DocsTitle
7
+ DocsBody ,
8
+ DocsDescription ,
9
+ DocsPage ,
10
+ DocsTitle
11
11
} from "fumadocs-ui/page"
12
12
import { notFound } from "next/navigation"
13
13
14
14
import { source } from "@/lib/source"
15
15
const generator = createGenerator ( )
16
16
17
17
export default async function Page ( props : {
18
- params : Promise < { slug ?: string [ ] } >
18
+ params : Promise < { slug ?: string [ ] } >
19
19
} ) {
20
- const params = await props . params
21
- const page = source . getPage ( params . slug )
20
+ const params = await props . params
21
+ const page = source . getPage ( params . slug )
22
22
23
- if ( ! page ) notFound ( )
23
+ if ( ! page ) notFound ( )
24
24
25
- const MDX = page . data . body
25
+ const MDX = page . data . body
26
26
27
- return (
28
- < DocsPage full = { page . data . full } toc = { page . data . toc } >
29
- < DocsTitle > { page . data . title } </ DocsTitle >
27
+ return (
28
+ < DocsPage full = { page . data . full } toc = { page . data . toc } >
29
+ < DocsTitle > { page . data . title } </ DocsTitle >
30
30
31
- < DocsDescription > { page . data . description } </ DocsDescription >
31
+ < DocsDescription > { page . data . description } </ DocsDescription >
32
32
33
- < DocsBody >
34
- < MDX
35
- components = { {
36
- AutoTypeTable : ( props ) => (
37
- < AutoTypeTable { ...props } generator = { generator } />
38
- ) ,
39
- Tab,
40
- Tabs,
41
- ...defaultMdxComponents
42
- } }
43
- />
44
- </ DocsBody >
45
- </ DocsPage >
46
- )
33
+ < DocsBody >
34
+ < MDX
35
+ components = { {
36
+ AutoTypeTable : ( props ) => (
37
+ < AutoTypeTable { ...props } generator = { generator } />
38
+ ) ,
39
+ Tab,
40
+ Tabs,
41
+ ...defaultMdxComponents
42
+ } }
43
+ />
44
+ </ DocsBody >
45
+ </ DocsPage >
46
+ )
47
47
}
48
48
49
49
export async function generateStaticParams ( ) {
50
- return source . generateParams ( )
50
+ return source . generateParams ( )
51
51
}
52
52
53
53
export async function generateMetadata ( props : {
54
- params : Promise < { slug ?: string [ ] } >
54
+ params : Promise < { slug ?: string [ ] } >
55
55
} ) {
56
- const params = await props . params
57
- const page = source . getPage ( params . slug )
56
+ const params = await props . params
57
+ const page = source . getPage ( params . slug )
58
58
59
- if ( ! page ) notFound ( )
59
+ if ( ! page ) notFound ( )
60
60
61
- return {
62
- title : page . data . title ,
63
- description : page . data . description
64
- }
61
+ return {
62
+ title : page . data . title ,
63
+ description : page . data . description
64
+ }
65
65
}
0 commit comments