Skip to content

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

Fix foreign key mgt table editor open in new tab (#30095)

Joshen Limb649eeb13887
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ForeignKeysManagement/ForeignKeyRow.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ForeignKeysManagement/ForeignKeyRow.tsx
index d74b6296931..182ce4d15c5 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ForeignKeysManagement/ForeignKeyRow.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ForeignKeysManagement/ForeignKeyRow.tsx
@@ -7,6 +7,7 @@ import { Badge, Button, cn } from 'ui'
import { EditorTablePageLink } from 'data/prefetchers/project.$ref.editor.$id'
import { BASE_PATH } from 'lib/constants'
import type { ForeignKey } from '../../ForeignKeySelector/ForeignKeySelector.types'
+import Link from 'next/link'
interface ForeignKeyProps {
foreignKey: ForeignKey
@@ -77,13 +78,13 @@ export const ForeignKeyRow = ({
/>
}
>
- <EditorTablePageLink
- projectRef={ref}
- id={String(foreignKey.tableId)}
- onClick={() => closePanel()}
+ <Link
+ target="_blank"
+ rel="norefererer"
+ href={`/project/${ref}/editor/${foreignKey.tableId}`}
>
{foreignKey.schema}.{foreignKey.table}
- </EditorTablePageLink>
+ </Link>
</Button>
</div>
</div>
diff --git a/apps/studio/components/layouts/ProjectIntegrationsLayout/ProjectIntegrationsLayout.tsx b/apps/studio/components/layouts/ProjectIntegrationsLayout/ProjectIntegrationsLayout.tsx
index a7a08d5f617..e9deeeb9190 100644
--- a/apps/studio/components/layouts/ProjectIntegrationsLayout/ProjectIntegrationsLayout.tsx
+++ b/apps/studio/components/layouts/ProjectIntegrationsLayout/ProjectIntegrationsLayout.tsx
@@ -24,7 +24,7 @@ const ProjectIntegrationsMenu = () => {
projectRef: project?.ref,
connectionString: project?.connectionString,
})
- console.log({ data })
+
const pgNetExtensionExists = (data ?? []).find((ext) => ext.name === 'pg_net') !== undefined
const graphqlExtensionExists = (data ?? []).find((ext) => ext.name === 'pg_graphql') !== undefined