From c9927b1c746a3983ce37f8ef2d258cf3e2528a2b Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Thu, 26 Aug 2021 16:02:47 +0200 Subject: [PATCH] Don't open a new tab when clicking on the ownership card Signed-off-by: Oliver Sand --- .changeset/nasty-jokes-camp.md | 5 +++ .../Cards/OwnershipCard/OwnershipCard.tsx | 42 +++++++++---------- 2 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 .changeset/nasty-jokes-camp.md diff --git a/.changeset/nasty-jokes-camp.md b/.changeset/nasty-jokes-camp.md new file mode 100644 index 0000000000..e30ff75911 --- /dev/null +++ b/.changeset/nasty-jokes-camp.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-org': patch +--- + +Don't open a new tab when clicking on the ownership card. diff --git a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.tsx b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.tsx index 32a2061297..da7f8381e3 100644 --- a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.tsx +++ b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.tsx @@ -15,26 +15,6 @@ */ import { Entity } from '@backstage/catalog-model'; -import { - catalogApiRef, - isOwnerOf, - useEntity, - catalogRouteRef, - formatEntityRefTitle, -} from '@backstage/plugin-catalog-react'; -import { BackstageTheme, genPageTheme } from '@backstage/theme'; -import { - Box, - createStyles, - Grid, - makeStyles, - Typography, - Link, -} from '@material-ui/core'; -import React from 'react'; -import { useAsync } from 'react-use'; -import { generatePath } from 'react-router'; -import qs from 'qs'; import { InfoCard, InfoCardVariants, @@ -42,6 +22,26 @@ import { ResponseErrorPanel, } from '@backstage/core-components'; import { useApi, useRouteRef } from '@backstage/core-plugin-api'; +import { + catalogApiRef, + catalogRouteRef, + formatEntityRefTitle, + isOwnerOf, + useEntity, +} from '@backstage/plugin-catalog-react'; +import { BackstageTheme, genPageTheme } from '@backstage/theme'; +import { + Box, + createStyles, + Grid, + Link, + makeStyles, + Typography, +} from '@material-ui/core'; +import qs from 'qs'; +import React from 'react'; +import { generatePath } from 'react-router'; +import { useAsync } from 'react-use'; type EntityTypeProps = { kind: string; @@ -96,7 +96,7 @@ const EntityCountTile = ({ const classes = useStyles({ type }); return ( - +