diff --git a/plugins/org/src/components/Cards/Group/GroupProfile/GroupProfileCard.tsx b/plugins/org/src/components/Cards/Group/GroupProfile/GroupProfileCard.tsx index 8d44e9157a..637a7279f6 100644 --- a/plugins/org/src/components/Cards/Group/GroupProfile/GroupProfileCard.tsx +++ b/plugins/org/src/components/Cards/Group/GroupProfile/GroupProfileCard.tsx @@ -28,7 +28,6 @@ import { import { Box, Grid, - Link, List, ListItem, ListItemIcon, @@ -42,7 +41,12 @@ import GroupIcon from '@material-ui/icons/Group'; import EditIcon from '@material-ui/icons/Edit'; import Alert from '@material-ui/lab/Alert'; import React from 'react'; -import { Avatar, InfoCard, InfoCardVariants } from '@backstage/core-components'; +import { + Avatar, + InfoCard, + InfoCardVariants, + Link, +} from '@backstage/core-components'; const CardTitle = ({ title }: { title: string }) => ( @@ -75,10 +79,10 @@ export const GroupProfileCard = ({ kind: 'group', }); - const entityMetadataEditUrl = getEntityMetadataEditUrl(group); + const entityMetadataEditUrl = getEntityMetadataEditUrl(group) ?? '#'; const displayName = profile?.displayName ?? name; - const emailHref = profile?.email ? `mailto:${profile.email}` : undefined; + const emailHref = profile?.email ? `mailto:${profile.email}` : '#'; return ( { - window.open(entityMetadataEditUrl ?? '#', '_blank'); - }} + component={Link} + target="_blank" + to={entityMetadataEditUrl} > @@ -112,7 +116,7 @@ export const GroupProfileCard = ({ - {profile.email} + {profile.email} )}