mirror of
https://github.com/supabase/supabase.git
synced 2026-06-23 05:03:48 +08:00
23 lines
967 B
TypeScript
23 lines
967 B
TypeScript
import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
|
|
import typeSpec from '~/../../spec/enrichments/tsdoc_v2/combined.json'
|
|
// @ts-expect-error
|
|
import spec from '~/../../spec/supabase_js_v2_temp_new_shape.yml' assert { type: 'yml' }
|
|
import RefSectionHandler from '~/components/reference/RefSectionHandler'
|
|
import { flattenSections } from '~/lib/helpers'
|
|
import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
|
|
import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'
|
|
|
|
const sections = flattenSections(clientLibsCommonSections)
|
|
|
|
export default function JSReference(props) {
|
|
return <RefSectionHandler sections={sections} spec={spec} typeSpec={typeSpec} pageProps={props} />
|
|
}
|
|
|
|
export async function getStaticProps({ params }: { params: { slug: string[] } }) {
|
|
return handleRefStaticProps(sections, params, '/javascript', '/javascript')
|
|
}
|
|
|
|
export function getStaticPaths() {
|
|
return handleRefGetStaticPaths()
|
|
}
|