Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Merge branch 'master' into feat/client-lib-version-sticky-warning

Greg Richardson2a798515ba72
diff --cc apps/docs/components/reference/RefSectionHandler.tsx
index 3e2c443035c,107a2c788a3..55f103a2c52
--- a/apps/docs/components/reference/RefSectionHandler.tsx
+++ b/apps/docs/components/reference/RefSectionHandler.tsx
@@@ -8,11 -8,10 +8,11 @@@ import RefFunctionSection from '~/compo
import RefSubLayout from '~/layouts/ref/RefSubLayout'
import ApiOperationSection from './ApiOperationSection'
import CliCommandSection from './CLICommandSection'
+import OldVersionAlert from './OldVersionAlert'
- import { IAPISpec, ICommonFunc, IRefStaticDoc, ISpec, TypeSpec } from './Reference.types'
+ import { IAPISpec, ICommonSection, IRefStaticDoc, ISpec, TypeSpec } from './Reference.types'
interface RefSectionHandlerProps {
- sections: ICommonFunc[]
+ sections: ICommonSection[]
spec?: ISpec | IAPISpec
typeSpec?: TypeSpec
pageProps: { docs: IRefStaticDoc[] }
@@@ -60,15 -69,20 +71,21 @@@ const RefSectionHandler = (props: RefSe
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</Head>
+ {props.isOldVersion && <OldVersionAlert />}
<RefSubLayout>
- {props.sections.map((x, i) => {
- switch (x.type) {
+ {props.sections.map((section, i) => {
+ const sectionType = section.type
+ switch (sectionType) {
case 'markdown':
- const markdownData = props.pageProps.docs.find((doc) => doc.id === x.id)
+ const markdownData = props.pageProps.docs.find((doc) => doc.id === section.id)
- return <RefEducationSection key={x.id + i} item={x} markdownContent={markdownData} />
- break
+ return (
+ <RefEducationSection
+ key={section.id + i}
+ item={section}
+ markdownContent={markdownData}
+ />
+ )
case 'function':
return (
<RefFunctionSection
diff --cc apps/docs/pages/reference/dart/v0/[...slug].tsx
index f3895268e5c,8cee39483e0..86af70c75c8
--- a/apps/docs/pages/reference/dart/v0/[...slug].tsx
+++ b/apps/docs/pages/reference/dart/v0/[...slug].tsx
@@@ -7,17 -6,10 +6,18 @@@ import handleRefGetStaticPaths from '~/
import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'
const sections = flattenSections(clientLibsCommonSections)
+ const libraryPath = '/dart/v0'
export default function JSReference(props) {
- return <RefSectionHandler sections={sections} spec={spec} pageProps={props} type="client-lib" />
+ return (
+ <RefSectionHandler
+ sections={sections}
+ spec={spec}
+ pageProps={props}
+ type="client-lib"
+ isOldVersion
+ />
+ )
}
export async function getStaticProps() {