Skip to content

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

Fix navigation, fix sign up examples having the same id

Jan Tennert14bf9a77a956
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
index de73c85aea9..2c5ad1a6734 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
@@ -143,6 +143,13 @@ const menus: Menu[] = [
specFile: 'supabase_swift_v0.yml',
type: 'reference',
},
+ {
+ id: 'reference_kotlin_v0',
+ path: '/reference/kotlin',
+ commonSectionsFile: 'common-client-libs-sections.json',
+ specFile: 'supabase_kt_v0.yml',
+ type: 'reference',
+ },
{
id: 'reference_cli',
path: '/reference/cli',
diff --git a/apps/docs/pages/reference/kotlin/[...slug].tsx b/apps/docs/pages/reference/kotlin/[...slug].tsx
index e37dc6d8c72..c318fd11a91 100644
--- a/apps/docs/pages/reference/kotlin/[...slug].tsx
+++ b/apps/docs/pages/reference/kotlin/[...slug].tsx
@@ -1,5 +1,4 @@
import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
-// @ts-expect-error
import spec from '~/../../spec/supabase_kt_v0.yml' assert { type: 'yml' }
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
@@ -7,15 +6,16 @@ import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'
const sections = flattenSections(clientLibsCommonSections)
+const libraryPath = '/kotlin'
-export default function JSReference(props) {
+export default function KotlinReference(props) {
return <RefSectionHandler sections={sections} spec={spec} pageProps={props} type="client-lib" />
}
export async function getStaticProps() {
- return handleRefStaticProps(sections, '/kotlin')
+ return handleRefStaticProps(sections, libraryPath)
}
-export function getStaticPaths() {
- return handleRefGetStaticPaths()
+export async function getStaticPaths() {
+ return handleRefGetStaticPaths(sections, libraryPath)
}
diff --git a/apps/docs/pages/reference/kotlin/crawlers/[...slug].tsx b/apps/docs/pages/reference/kotlin/crawlers/[...slug].tsx
index ca69ce3e032..4cddf918ab0 100644
--- a/apps/docs/pages/reference/kotlin/crawlers/[...slug].tsx
+++ b/apps/docs/pages/reference/kotlin/crawlers/[...slug].tsx
@@ -1,6 +1,5 @@
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_kt_v0.yml' assert { type: 'yml' }
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
@@ -10,35 +9,36 @@ import { useRouter } from 'next/router'
import RefSEO from '~/components/reference/RefSEO'
const sections = flattenSections(clientLibsCommonSections)
+const libraryPath = '/kotlin'
-export default function JSReference(props) {
- const router = useRouter()
- const slug = router.query.slug[0]
- const filteredSection = sections.filter((section) => section.id === slug)
+export default function KotlinReference(props) {
+ const router = useRouter()
+ const slug = router.query.slug[0]
+ const filteredSection = sections.filter((section) => section.id === slug)
- const pageTitle = filteredSection[0]?.title
- ? `${filteredSection[0]?.title} | Supabase`
- : 'Supabase'
+ const pageTitle = filteredSection[0]?.title
+ ? `${filteredSection[0]?.title} | Supabase`
+ : 'Supabase'
- return (
- <>
- <RefSEO title={pageTitle} />
+ return (
+ <>
+ <RefSEO title={pageTitle} />
- <RefSectionHandler
- sections={filteredSection}
- spec={spec}
- typeSpec={typeSpec}
- pageProps={props}
- type="client-lib"
- />
- </>
- )
+ <RefSectionHandler
+ sections={filteredSection}
+ spec={spec}
+ typeSpec={typeSpec}
+ pageProps={props}
+ type="client-lib"
+ />
+ </>
+ )
}
export async function getStaticProps() {
- return handleRefStaticProps(sections, '/kotlin')
+ return handleRefStaticProps(sections, libraryPath)
}
-export function getStaticPaths() {
- return handleRefGetStaticPaths()
+export async function getStaticPaths() {
+ return handleRefGetStaticPaths(sections, libraryPath)
}
diff --git a/apps/docs/pages/reference/kotlin/v0/[...slug].tsx b/apps/docs/pages/reference/kotlin/v0/[...slug].tsx
index a3a45e241c1..59670e66890 100644
--- a/apps/docs/pages/reference/kotlin/v0/[...slug].tsx
+++ b/apps/docs/pages/reference/kotlin/v0/[...slug].tsx
@@ -1,5 +1,4 @@
import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
-// @ts-expect-error
import spec from '~/../../spec/supabase_kt_v0.yml' assert { type: 'yml' }
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
@@ -7,15 +6,16 @@ import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'
const sections = flattenSections(clientLibsCommonSections)
+const libraryPath = '/kotlin/v0'
-export default function JSReference(props) {
+export default function KotlinReference(props) {
return <RefSectionHandler sections={sections} spec={spec} pageProps={props} type="client-lib" />
}
export async function getStaticProps() {
- return handleRefStaticProps(sections, '/kotlin/v0')
+ return handleRefStaticProps(sections, libraryPath)
}
-export function getStaticPaths() {
- return handleRefGetStaticPaths()
+export async function getStaticPaths() {
+ return handleRefGetStaticPaths(sections, libraryPath)
}
diff --git a/apps/docs/pages/reference/kotlin/v0/crawlers/[...slug].tsx b/apps/docs/pages/reference/kotlin/v0/crawlers/[...slug].tsx
index 9abe17bfae9..03a1a3c0407 100644
--- a/apps/docs/pages/reference/kotlin/v0/crawlers/[...slug].tsx
+++ b/apps/docs/pages/reference/kotlin/v0/crawlers/[...slug].tsx
@@ -1,6 +1,5 @@
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_kt_v0.yml' assert { type: 'yml' }
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
@@ -10,34 +9,35 @@ import { useRouter } from 'next/router'
import RefSEO from '~/components/reference/RefSEO'
const sections = flattenSections(clientLibsCommonSections)
+const libraryPath = '/kotlin/v0'
-export default function JSReference(props) {
- const router = useRouter()
- const slug = router.query.slug[0]
- const filteredSection = sections.filter((section) => section.id === slug)
+export default function KotlinReference(props) {
+ const router = useRouter()
+ const slug = router.query.slug[0]
+ const filteredSection = sections.filter((section) => section.id === slug)
- const pageTitle = filteredSection[0]?.title
- ? `${filteredSection[0]?.title} | Supabase`
- : 'Supabase'
- return (
- <>
- <RefSEO title={pageTitle} />
+ const pageTitle = filteredSection[0]?.title
+ ? `${filteredSection[0]?.title} | Supabase`
+ : 'Supabase'
+ return (
+ <>
+ <RefSEO title={pageTitle} />
- <RefSectionHandler
- sections={filteredSection}
- spec={spec}
- typeSpec={typeSpec}
- pageProps={props}
- type="client-lib"
- />
- </>
- )
+ <RefSectionHandler
+ sections={filteredSection}
+ spec={spec}
+ typeSpec={typeSpec}
+ pageProps={props}
+ type="client-lib"
+ />
+ </>
+ )
}
export async function getStaticProps() {
- return handleRefStaticProps(sections, '/kotlin/v0')
+ return handleRefStaticProps(sections, libraryPath)
}
-export function getStaticPaths() {
- return handleRefGetStaticPaths()
+export async function getStaticPaths() {
+ return handleRefGetStaticPaths(sections, libraryPath)
}
diff --git a/spec/supabase_kt_v0.yml b/spec/supabase_kt_v0.yml
index ecd06771b3d..446d7ff685d 100644
--- a/spec/supabase_kt_v0.yml
+++ b/spec/supabase_kt_v0.yml
@@ -2048,7 +2048,7 @@ functions:
- If **Confirm email** is enabled in [your project](https://app.supabase.com/project/_/auth/providers), an obfuscated/fake user object is returned.
- If **Confirm email** is disabled, the error message, `User already registered` is returned.
examples:
- - id: sign-up
+ - id: sign-up-phone
name: Sign up with email
isSpotlight: true
code: |
@@ -2058,7 +2058,7 @@ functions:
password = "example-password"
}
```
- - id: sign-up
+ - id: sign-up-phone
name: Sign up with a phone number
isSpotlight: true
code: |