Skip to content

Commit e59c857

Browse files
committed
Fix overview page links
- refactor compnent cards
1 parent 2c1e8a3 commit e59c857

File tree

9 files changed

+190
-592
lines changed

9 files changed

+190
-592
lines changed

apps/landing/src/app/(detail)/components/[component]/page.tsx

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { CustomH6 } from '@/components/mdx/components/CustomH6'
66
import { CustomParagraph } from '@/components/mdx/components/CustomParagraph'
77
import { CustomPre } from '@/components/mdx/components/CustomPre'
88
import { CustomStrong } from '@/components/mdx/components/CustomStrong'
9+
import { COMPONENT_GROUPS } from '@/constants'
910
import { getDemos } from '@/utils/get-demos'
1011

1112
import MdxCard from '../MdxCard'
@@ -37,35 +38,11 @@ export const generateMetadata = async ({
3738
}
3839

3940
export const generateStaticParams = async () => {
40-
return [
41-
'button',
42-
'input',
43-
'uploader',
44-
'toggle',
45-
'tooltip',
46-
'textarea',
47-
'textbox',
48-
'theme-button',
49-
'snackbar',
50-
'stepper',
51-
'tab',
52-
'search',
53-
'select',
54-
'slider',
55-
'pagination',
56-
'progress-bar',
57-
'radio',
58-
'header',
59-
'label',
60-
'menu',
61-
'dropdown',
62-
'footer',
63-
'color-picker',
64-
'confirm',
65-
'date-picker',
66-
'checkbox',
67-
'bottom-sheet',
68-
].map((component) => ({ component }))
41+
return Object.values(COMPONENT_GROUPS)
42+
.flat()
43+
.map((component) => ({
44+
component,
45+
}))
6946
}
7047

7148
export default async function Page({

0 commit comments

Comments
 (0)