mirror of
https://github.com/supabase/supabase.git
synced 2026-05-07 09:20:21 -04:00
18 lines
554 B
TypeScript
18 lines
554 B
TypeScript
import type { ICommonMarkdown, ICommonSection } from '~/components/reference/Reference.types'
|
|
import generateRefMarkdown from '~/lib/mdx/generateRefMarkdown'
|
|
|
|
async function handleRefStaticProps(sections: ICommonSection[], libraryPath: string) {
|
|
const markdownSections = sections.filter(
|
|
(section): section is ICommonMarkdown => section.type === 'markdown'
|
|
)
|
|
const markdownContent = await generateRefMarkdown(markdownSections, libraryPath)
|
|
|
|
return {
|
|
props: {
|
|
docs: markdownContent,
|
|
},
|
|
}
|
|
}
|
|
|
|
export default handleRefStaticProps
|