The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
change pages for new templates
Jonathan Summers-Muir0a9bb6e314f2
diff --git a/studio/components/layouts/AuthLayout/AuthLayout.utils.ts b/studio/components/layouts/AuthLayout/AuthLayout.utils.tsindex 17de5da94ea..6632b850e22 100644--- a/studio/components/layouts/AuthLayout/AuthLayout.utils.ts+++ b/studio/components/layouts/AuthLayout/AuthLayout.utils.ts@@ -39,8 +39,8 @@ export const generateAuthMenu = (ref: string): ProductMenuGroup[] => {: []),{name: 'Templates',- key: 'settings-templates',- url: `/project/${ref}/auth/templates-new`,+ key: 'templates',+ url: `/project/${ref}/auth/templates`,items: [],},],diff --git a/studio/pages/project/[ref]/auth/templates-new.tsx b/studio/pages/project/[ref]/auth/templates-new.tsxdeleted file mode 100644index 6459554e8bc..00000000000--- a/studio/pages/project/[ref]/auth/templates-new.tsx+++ /dev/null@@ -1,31 +0,0 @@-import { EmailTemplates, SmtpForm } from 'components/interfaces'-import { AuthLayout } from 'components/layouts'-import { FormsContainer } from 'components/ui/Forms'-import { useStore } from 'hooks'-import { observer } from 'mobx-react-lite'-import { useEffect } from 'react'-import { NextPageWithLayout } from 'types'--const PageLayout: NextPageWithLayout = () => {- const { ui, authConfig } = useStore()-- useEffect(() => {- // temporary store loader- authConfig.load()- }, [ui.selectedProjectRef])-- if (authConfig) {- return (- <FormsContainer header="Email">- <SmtpForm />- <EmailTemplates />- </FormsContainer>- )- }-}--PageLayout.getLayout = (page) => {- return <AuthLayout>{page}</AuthLayout>-}--export default observer(PageLayout)diff --git a/studio/pages/project/[ref]/auth/templates-old.tsx b/studio/pages/project/[ref]/auth/templates-old.tsxnew file mode 100644index 00000000000..92c73531f3f--- /dev/null+++ b/studio/pages/project/[ref]/auth/templates-old.tsx@@ -0,0 +1,20 @@+import { observer } from 'mobx-react-lite'+import { useStore } from 'hooks'+import { AuthLayout } from 'components/layouts'+import { Templates } from 'components/interfaces/Authentication'+import { NextPageWithLayout } from 'types'++const TemplatesPage: NextPageWithLayout = () => {+ const { ui } = useStore()+ const project = ui.selectedProject++ return (+ <div className="p-4">+ <Templates project={project} />+ </div>+ )+}++TemplatesPage.getLayout = (page) => <AuthLayout title="Auth">{page}</AuthLayout>++export default observer(TemplatesPage)diff --git a/studio/pages/project/[ref]/auth/templates.tsx b/studio/pages/project/[ref]/auth/templates.tsxindex 92c73531f3f..6459554e8bc 100644--- a/studio/pages/project/[ref]/auth/templates.tsx+++ b/studio/pages/project/[ref]/auth/templates.tsx@@ -1,20 +1,31 @@-import { observer } from 'mobx-react-lite'-import { useStore } from 'hooks'+import { EmailTemplates, SmtpForm } from 'components/interfaces'import { AuthLayout } from 'components/layouts'-import { Templates } from 'components/interfaces/Authentication'+import { FormsContainer } from 'components/ui/Forms'+import { useStore } from 'hooks'+import { observer } from 'mobx-react-lite'+import { useEffect } from 'react'import { NextPageWithLayout } from 'types'-const TemplatesPage: NextPageWithLayout = () => {- const { ui } = useStore()- const project = ui.selectedProject+const PageLayout: NextPageWithLayout = () => {+ const { ui, authConfig } = useStore()++ useEffect(() => {+ // temporary store loader+ authConfig.load()+ }, [ui.selectedProjectRef])- return (- <div className="p-4">- <Templates project={project} />- </div>- )+ if (authConfig) {+ return (+ <FormsContainer header="Email">+ <SmtpForm />+ <EmailTemplates />+ </FormsContainer>+ )+ }}-TemplatesPage.getLayout = (page) => <AuthLayout title="Auth">{page}</AuthLayout>+PageLayout.getLayout = (page) => {+ return <AuthLayout>{page}</AuthLayout>+}-export default observer(TemplatesPage)+export default observer(PageLayout)