The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Fix addSnippet
Terry Suttone779db214d6c
diff --git a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLAI.tsx b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLAI.tsxindex e663164afaf..cea66082aa5 100644--- a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLAI.tsx+++ b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLAI.tsx@@ -78,7 +78,7 @@ const SQLAI = () => {try {const snippet = createSqlSnippetSkeleton({ name, sql, owner_id: profile?.id })const data = { ...snippet, id: uuidv4() }- snap.addSnippet(data as SqlSnippet, ref, true)+ snap.addSnippet(data as SqlSnippet, ref)router.push(`/project/${ref}/sql/${data.id}`)} catch (error: any) {ui.setNotification({diff --git a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLQuickstarts.tsx b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLQuickstarts.tsxindex 870310b3eca..c296e101968 100644--- a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLQuickstarts.tsx+++ b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLQuickstarts.tsx@@ -42,7 +42,7 @@ const SQLQuickstarts = observer(() => {try {const snippet = createSqlSnippetSkeleton({ name, sql, owner_id: profile?.id })const data = { ...snippet, id: uuidv4() }- snap.addSnippet(data as SqlSnippet, ref, true)+ snap.addSnippet(data as SqlSnippet, ref)router.push(`/project/${ref}/sql/${data.id}`)} catch (error: any) {ui.setNotification({diff --git a/studio/components/layouts/SQLEditorLayout/QueryItem.tsx b/studio/components/layouts/SQLEditorLayout/QueryItem.tsxindex b0acf33a1d9..402da1ca2ff 100644--- a/studio/components/layouts/SQLEditorLayout/QueryItem.tsx+++ b/studio/components/layouts/SQLEditorLayout/QueryItem.tsx@@ -164,7 +164,7 @@ const QueryItemActions = observer(({ tabInfo, activeId }: QueryItemActionsProps)try {const snippet = createSqlSnippetSkeleton({ name, sql: content.sql, owner_id: profile?.id })const data = { ...snippet, id: uuidv4() }- snap.addSnippet(data as SqlSnippet, ref, true)+ snap.addSnippet(data as SqlSnippet, ref)router.push(`/project/${ref}/sql/${data.id}`)} catch (error: any) {ui.setNotification({