mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
20 lines
468 B
TypeScript
20 lines
468 B
TypeScript
import { ICommonSection } from '~/components/reference/Reference.types'
|
|
|
|
async function handleRefGetStaticPaths(sections: ICommonSection[], libraryPath: string) {
|
|
return {
|
|
paths: sections.map((section) => {
|
|
return {
|
|
params: {
|
|
slug: libraryPath
|
|
.split('/')
|
|
.filter((dir) => !!dir)
|
|
.concat(section.slug),
|
|
},
|
|
}
|
|
}),
|
|
fallback: 'blocking',
|
|
}
|
|
}
|
|
|
|
export default handleRefGetStaticPaths
|