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

* Fix foreign key mgt table editor open in new tab

* Fix
This commit is contained in:
Joshen Lim
2024-10-25 18:08:05 +08:00
committed by GitHub
parent cb2c1381f1
commit b649eeb138
2 changed files with 7 additions and 6 deletions

View File

@@ -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>

View File

@@ -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