From b649eeb1388711376be28b2ee1cf6efc19b1fb1c Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Fri, 25 Oct 2024 18:08:05 +0800 Subject: [PATCH] Fix foreign key mgt table editor open in new tab (#30095) * Fix foreign key mgt table editor open in new tab * Fix --- .../ForeignKeysManagement/ForeignKeyRow.tsx | 11 ++++++----- .../ProjectIntegrationsLayout.tsx | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) 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 = ({ /> } > - closePanel()} + {foreignKey.schema}.{foreignKey.table} - + 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