mirror of
https://github.com/supabase/supabase.git
synced 2026-06-04 11:51:55 +08:00
27 lines
896 B
TypeScript
27 lines
896 B
TypeScript
import { GuideTemplate } from '~/features/docs/GuidesMdx.template'
|
|
import {
|
|
genGuideMeta,
|
|
genGuidesStaticParams,
|
|
getGuidesMarkdown,
|
|
} from '~/features/docs/GuidesMdx.utils'
|
|
import { getEmptyArray } from '~/features/helpers.fn'
|
|
import { IS_DEV } from '~/lib/constants'
|
|
|
|
type Params = { slug?: string[] }
|
|
|
|
const GettingStartedGuidePage = async (props: { params: Promise<Params> }) => {
|
|
const params = await props.params
|
|
const slug = ['getting-started', ...(params.slug ?? [])]
|
|
const data = await getGuidesMarkdown(slug)
|
|
|
|
return <GuideTemplate {...data!} />
|
|
}
|
|
|
|
const generateStaticParams = !IS_DEV ? genGuidesStaticParams('getting-started') : getEmptyArray
|
|
const generateMetadata = genGuideMeta((params: { slug?: string[] }) =>
|
|
getGuidesMarkdown(['getting-started', ...(params.slug ?? [])])
|
|
)
|
|
|
|
export default GettingStartedGuidePage
|
|
export { generateStaticParams, generateMetadata }
|