Skip to content

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

update cards

Jonathan Summers-Muir475fbd006332
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
index 6304b5d40ed..4e9d276e73e 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
@@ -12,53 +12,54 @@ const SideNav = () => {
const tempBasePath = '/new'
- useEffect(() => {
- function handleRouteChange(url: string) {
- console.log('path changed')
- console.log(url)
- switch (url) {
- case `/docs${tempBasePath}`:
- setLevel('home')
- break
- case `/docs${tempBasePath}/getting-started`:
- setLevel('gettingstarted')
- break
- case `/docs${tempBasePath}/tutorials`:
- setLevel('tutorials')
- break
- case `/docs${tempBasePath}/database`:
- setLevel('database')
- break
- case `/docs${tempBasePath}/auth`:
- setLevel('auth')
- break
- case `/docs${tempBasePath}/storage`:
- setLevel('storage')
- break
- case `/docs${tempBasePath}/realtime`:
- setLevel('realtime')
- break
- case `/docs${tempBasePath}/edge-functions`:
- setLevel('functions')
- break
- case `/docs${tempBasePath}/reference`:
- setLevel('reference')
- break
- case `/docs${tempBasePath}/integrations`:
- setLevel('integrations')
- break
- case `/docs${tempBasePath}/platform`:
- setLevel('platform')
- break
- case url.includes(`/docs${tempBasePath}/reference/javascript/`) && url:
- setLevel('reference_javascript')
- break
+ function handleRouteChange(url: string) {
+ console.log('path changed')
+ console.log(url)
+ console.log('LISTEN')
+ switch (url) {
+ case `/docs${tempBasePath}`:
+ setLevel('home')
+ break
+ case `/docs${tempBasePath}/getting-started`:
+ setLevel('gettingstarted')
+ break
+ case `/docs${tempBasePath}/tutorials`:
+ setLevel('tutorials')
+ break
+ case `/docs${tempBasePath}/database`:
+ setLevel('database')
+ break
+ case `/docs${tempBasePath}/auth`:
+ setLevel('auth')
+ break
+ case `/docs${tempBasePath}/storage`:
+ setLevel('storage')
+ break
+ case `/docs${tempBasePath}/realtime`:
+ setLevel('realtime')
+ break
+ case `/docs${tempBasePath}/edge-functions`:
+ setLevel('functions')
+ break
+ case `/docs${tempBasePath}/reference`:
+ setLevel('reference')
+ break
+ case `/docs${tempBasePath}/integrations`:
+ setLevel('integrations')
+ break
+ case `/docs${tempBasePath}/platform`:
+ setLevel('platform')
+ break
+ case url.includes(`/docs${tempBasePath}/reference/javascript/`) && url:
+ setLevel('reference_javascript')
+ break
- default:
- break
- }
+ default:
+ break
}
+ }
+ useEffect(() => {
// Listen for page changes after a navigation or when the query changes
router.events.on('routeChangeComplete', handleRouteChange)
return () => {
@@ -66,6 +67,8 @@ const SideNav = () => {
}
}, [router.events])
+ // handleRouteChange(router.asPath)
+
const home = [
[
{
@@ -200,11 +203,17 @@ const SideNav = () => {
{home.map((section, sectionIndex) => {
return (
<>
- {sectionIndex !== 0 && <div className="h-px w-full bg-green-500"></div>}
- <div className="flex flex-col gap-2">
+ {sectionIndex !== 0 && (
+ <div
+ className="h-px w-full bg-green-500"
+ key={`section-${sectionIndex}-border`}
+ ></div>
+ )}
+ <div className="flex flex-col gap-2" key={`section-${sectionIndex}`}>
{section.map((link) => {
return (
<a
+ key={link.label}
onClick={() => {
// setLevel(link.level)
router.push(tempBasePath + link.href)
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
index 24c1cc58564..3d765484574 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
@@ -55,7 +55,7 @@ const NavigationMenuGuideList = ({ currentLevel, setLevel, tempBasePath, id }) =
{menu.items.map((x, index) => {
return (
- <div>
+ <div key={x.name}>
{x.items && x.items.length > 0 ? (
<>
{index !== 0 && <div className="h-px w-full bg-green-500 my-3"></div>}
@@ -64,7 +64,7 @@ const NavigationMenuGuideList = ({ currentLevel, setLevel, tempBasePath, id }) =
</span>
{x.items.map((x) => {
return (
- <li>
+ <li key={x.name}>
<a
onClick={() => {
router.push(`/${tempBasePath}${x.href}`)
@@ -103,7 +103,7 @@ const NavigationMenuGuideList = ({ currentLevel, setLevel, tempBasePath, id }) =
)}
{menu.extras?.map((x) => {
return (
- <div>
+ <div key={x.name}>
<li>
<a
onClick={() => {
diff --git a/apps/docs/layouts/SiteLayout.tsx b/apps/docs/layouts/SiteLayout.tsx
index 9fd3b1dba99..9b480d06433 100644
--- a/apps/docs/layouts/SiteLayout.tsx
+++ b/apps/docs/layouts/SiteLayout.tsx
@@ -1,3 +1,4 @@
+import Link from 'next/link'
import { useRouter } from 'next/router'
import Footer from '~/components/Footer'
import NavigationMenu from '~/components/Navigation/NavigationMenu/NavigationMenu'
@@ -19,7 +20,12 @@ const Layout = ({ children }) => {
<div className="col-span-3">
<NavigationMenu />
</div>
- <div className="col-span-9">{children}</div>
+ <div className="col-span-9">
+ <Link href="/docs/new/database" passHref>
+ go to database
+ </Link>
+ {children}
+ </div>
</div>
<Footer />
</main>
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index 612ccbbacc7..557afcbd0c5 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -16,17 +16,17 @@ import SiteLayout from '~/layouts/SiteLayout'
function MyApp({ Component, pageProps }: AppPropsWithLayout) {
const router = useRouter()
- function telemetry(route: string) {
- return post(`https://api.supabase.io/platform/telemetry/page`, {
- referrer: document.referrer,
- title: document.title,
- route,
- })
- }
+ // function telemetry(route: string) {
+ // return post(`https://api.supabase.io/platform/telemetry/page`, {
+ // referrer: document.referrer,
+ // title: document.title,
+ // route,
+ // })
+ // }
useEffect(() => {
function handleRouteChange(url: string) {
- telemetry(url)
+ // telemetry(url)
}
// Listen for page changes after a navigation or when the query changes
diff --git a/apps/docs/pages/new/index.mdx b/apps/docs/pages/new/index.mdx
index 3049e0804d9..3ad9fe6b221 100644
--- a/apps/docs/pages/new/index.mdx
+++ b/apps/docs/pages/new/index.mdx
@@ -1,4 +1,5 @@
import Layout from '~/layouts/DefaultLayout'
+import Link from 'next/link'
export const meta = {
title: 'Supabase Docs',
@@ -8,6 +9,7 @@ export const products = [
{
title: 'Database',
icon: 'database',
+ href: 'database',
description: `
Social Login allows the user to sign into a third party website instead of creating a new account specifically for that website.
`,
@@ -16,6 +18,7 @@ Social Login allows the user to sign into a third party website instead of creat
{
title: 'Auth',
icon: 'auth',
+ href: 'auth',
description: `
Social Login allows the user to sign into a third party website instead of creating a new account specifically for that website.
`,
@@ -24,6 +27,7 @@ Social Login allows the user to sign into a third party website instead of creat
{
title: 'Storage',
icon: 'storage',
+ href: 'storage',
description: `
Social Login allows the user to sign into a third party website instead of creating a new account specifically for that website.
`,
@@ -31,6 +35,7 @@ Social Login allows the user to sign into a third party website instead of creat
{
title: 'Realtime',
icon: 'realtime',
+ href: 'realtime',
description: `
Social Login allows the user to sign into a third party website instead of creating a new account specifically for that website.
`,
@@ -38,6 +43,7 @@ Social Login allows the user to sign into a third party website instead of creat
{
title: 'Edge Functions',
icon: 'functions',
+ href: 'functions',
description: `
Social Login allows the user to sign into a third party website instead of creating a new account specifically for that website.
`,
@@ -63,45 +69,44 @@ hello world
<div className="grid grid-cols-12 gap-6 not-prose">
{products.map((product) => {
return (
- <div
- className={`
+ <Link
+ href={`/new/${product.href}`}
+ passHref
+ key={product.title}
+ >
+ <a className={`
relative
group
overflow-hidden
-
bg-white dark:bg-scale-300 border rounded-md drop-shadow-sm
-
transition
-
border-scale-500
hover:border-scale-700
-
-
gap-6
p-8 flex flex-col ${
product.span ?? 'col-span-4'
- }`}
- >
- <img
- src={`/docs/img/gradient-bg.png`}
- className="transition-all absolute left-0 -top-64 w-[258px]
- duration-700 ease-out
- group-hover:w-[320px]
- "
- />
- <div className="flex items-center gap-3">
- <div className="bg-green-600 w-8 h-8 flex items-center justify-center rounded">
- <img className="bg-green-600 w-5" src={`/docs/img/icons/menu/${product.icon}.svg`} />
+ }`}>
+ <img
+ src={`/docs/img/gradient-bg.png`}
+ className="transition-all absolute left-0 -top-64 w-[258px]
+ duration-700 ease-out
+ group-hover:w-[320px]
+ "
+ />
+ <div className="flex items-center gap-3">
+ <div className="bg-green-600 w-8 h-8 flex items-center justify-center rounded">
+ <img className="bg-green-600 w-5" src={`/docs/img/icons/menu/${product.icon}.svg`} />
+ </div>
+ <h5 className="text-base text-scale-1200">{product.title}</h5>
</div>
- <h5 className="text-base text-scale-1200">{product.title}</h5>
- </div>
- <p className="text-sm text-scale-1100">
- Social Login allows the user to sign into a third party website instead of creating a new
- account specifically for that website.
- </p>
- <span className="text-brand-900 justify-end text-sm">Learn more</span>
- </div>
+ <p className="text-sm text-scale-1100">
+ Social Login allows the user to sign into a third party website instead of creating a new
+ account specifically for that website.
+ </p>
+ <span className="text-brand-900 justify-end text-sm">Learn more</span>
+ </a>
+ </Link>
)
})}