The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: getLayout merge
Alaister Young5f1843827587
diff --git a/studio/components/interfaces/Functions/Functions.constants.ts b/studio/components/interfaces/Functions/Functions.constants.tsindex 5941f7457f5..f1e226e254d 100644--- a/studio/components/interfaces/Functions/Functions.constants.ts+++ b/studio/components/interfaces/Functions/Functions.constants.ts@@ -1,4 +1,3 @@export const WARNING_MESSAGE = {- title: ' Functions is pre release',- description: 'Functions are experimental and will be prone to breaking changes',+ title: 'Edge Functions are experimental until 1st August 2022. There will be breaking changes.',}diff --git a/studio/components/interfaces/Functions/FunctionsLayout.tsx b/studio/components/interfaces/Functions/FunctionsLayout.tsxindex 652fbc2c789..0bb2c3e0c59 100644--- a/studio/components/interfaces/Functions/FunctionsLayout.tsx+++ b/studio/components/interfaces/Functions/FunctionsLayout.tsx@@ -25,7 +25,7 @@ const FunctionsLayout = ({ children }: { children?: React.ReactNode }) => {if (!functions.isLoaded) {return (<BaseLayout>- <Loading active={true}>loading</Loading>+ <Loading active={true}>{''}</Loading></BaseLayout>)}@@ -59,10 +59,7 @@ const FunctionsLayout = ({ children }: { children?: React.ReactNode }) => {</div><h1 className="text-2xl text-scale-1200">Functions</h1></div>- <WarningBanner- title={WARNING_MESSAGE.title}- description={WARNING_MESSAGE.description}- />+ <WarningBanner title={WARNING_MESSAGE.title} /></div>{children}@@ -136,10 +133,7 @@ const FunctionsLayout = ({ children }: { children?: React.ReactNode }) => {)}</div><div>- <WarningBanner- title={WARNING_MESSAGE.title}- description={WARNING_MESSAGE.description}- />+ <WarningBanner title={WARNING_MESSAGE.title} /></div></div>{item && <FunctionsNav item={item} />}diff --git a/studio/components/ui/WarningBanner.tsx b/studio/components/ui/WarningBanner.tsxindex 26079d95775..02ea412d50b 100644--- a/studio/components/ui/WarningBanner.tsx+++ b/studio/components/ui/WarningBanner.tsx@@ -1,6 +1,6 @@import { IconAlertCircle } from '@supabase/ui'-const WarningBanner = ({ title, description }: { title: string; description: string }) => {+const WarningBanner = ({ title, description }: { title: string; description?: string }) => {return (<div className="rounded bg-yellow-900 px-6 py-3"><div className="flex flex-row gap-4">@@ -8,8 +8,10 @@ const WarningBanner = ({ title, description }: { title: string; description: str<IconAlertCircle size={14} strokeWidth={2} /></div><div className="flex flex-col xl:flex-row gap-x-3 items-start xl:items-center">- <h1 className="text-sm text-scale-1200 dark:text-scale-100">{title}</h1>- <p className="text-xs text-yellow-1200 dark:text-yellow-800">{description}</p>+ <h2 className="text-sm text-scale-1200 dark:text-scale-100">{title}</h2>+ {description && (+ <p className="text-xs text-yellow-1200 dark:text-yellow-800">{description}</p>+ )}</div></div></div>diff --git a/studio/pages/project/[ref]/functions/[id]/details.tsx b/studio/pages/project/[ref]/functions/[id]/details.tsxindex 890217d626d..91b9eba50b2 100644--- a/studio/pages/project/[ref]/functions/[id]/details.tsx+++ b/studio/pages/project/[ref]/functions/[id]/details.tsx@@ -101,7 +101,7 @@ const PageLayout: NextPageWithLayout = () => {<divclassName="px-10 py-8 bg-scale-100 dark:bg-scale-300 rounded border drop-shadow-sm-+ space-y-6"><div className="space-y-4 w-full">@@ -129,9 +129,7 @@ const PageLayout: NextPageWithLayout = () => {</div></div></div>- <span className="text-sm text-scale-900">This function is running correctly</span></div>- <span className="text-xs text-scale-900">This function is running correctly</span></div></div>@@ -164,23 +162,22 @@ const PageLayout: NextPageWithLayout = () => {dayjs(selectedFunction.updated_at).format('dddd, MMMM D, YYYY h:mm A')}</div></div>- </div>- <div className="grid grid-cols-3">- <span className="block text-scale-1000 text-sm mb-1">Version</span>- <div className="text-base text-scale-1200 col-span-2">v{selectedFunction?.version}</div>- </div>+ <div className="grid grid-cols-3">+ <span className="block text-scale-1000 text-sm mb-1">Version</span>+ <div className="text-base text-scale-1200 col-span-2">v{selectedFunction?.version}</div>+ </div>- <div className="grid grid-cols-3">- <span className="block text-scale-1000 text-sm mb-1">Regions</span>- <div className="flex flex-col gap-1 col-span-2">- <div className="text-base text-scale-1200 flex items-center gap-2">- <IconGlobe />- <span>Earth</span>+ <div className="grid grid-cols-3">+ <span className="block text-scale-1000 text-sm mb-1">Regions</span>+ <div className="flex flex-col gap-1 col-span-2">+ <div className="text-base text-scale-1200 flex items-center gap-2">+ <IconGlobe />+ <span>Earth</span>+ </div>+ <span className="text-sm text-scale-1000">All functions are deployed globally</span></div>- <span className="text-sm text-scale-1000">All functions are deployed globally</span></div>- <span className="text-xs text-scale-900">Supabase functions run on the edge</span></div></div>@@ -198,11 +195,12 @@ const PageLayout: NextPageWithLayout = () => {<h4>Command line access</h4></div><h4>Command line access</h4>++ <h5 className="text-base">Deployment management</h5>+ <CommandRender commands={managementCommands} />+ <h5 className="text-base">Secrets management</h5>+ <CommandRender commands={secretCommands} /></div>- <h5 className="text-base">Deployment management</h5>- <CommandRender commands={managementCommands} />- <h5 className="text-base">Secrets management</h5>- <CommandRender commands={secretCommands} /></div></div>)