The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix redirect loop (#38914)
Jordi Enric7b3007d22144
diff --git a/apps/studio/pages/project/[ref]/sql/[id].tsx b/apps/studio/pages/project/[ref]/sql/[id].tsxindex 558cfb8a90e..958d6884175 100644--- a/apps/studio/pages/project/[ref]/sql/[id].tsx+++ b/apps/studio/pages/project/[ref]/sql/[id].tsx@@ -12,6 +12,7 @@ import { SQLEditorMenu } from 'components/layouts/SQLEditorLayout/SQLEditorMenu'import { useContentIdQuery } from 'data/content/content-id-query'import { useDashboardHistory } from 'hooks/misc/useDashboardHistory'import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'+import { IS_PLATFORM } from 'lib/constants'import { SnippetWithContent, useSnippets, useSqlEditorV2StateSnapshot } from 'state/sql-editor-v2'import { createTabId, useTabsStateSnapshot } from 'state/tabs'import type { NextPageWithLayout } from 'types'@@ -53,7 +54,7 @@ const SqlEditor: NextPageWithLayout = () => {useEffect(() => {if (ref && data && project) {// [Joshen] Check if snippet belongs to the current project- if (data.project_id === project.id) {+ if (!IS_PLATFORM || data.project_id === project.id) {snapV2.setSnippet(ref, data as unknown as SnippetWithContent)} else {setLastVisitedSnippet(undefined)