Use correct Link in ownership card to avoid a full reload of the app while navigating

Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
This commit is contained in:
Oliver Sand
2021-09-07 16:17:52 +02:00
parent 6ad8fe1a0a
commit 70718686f1
2 changed files with 8 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-org': patch
---
Use correct `Link` in ownership card to avoid a full reload of the app while navigating.
@@ -18,6 +18,7 @@ import { Entity } from '@backstage/catalog-model';
import {
InfoCard,
InfoCardVariants,
Link,
Progress,
ResponseErrorPanel,
} from '@backstage/core-components';
@@ -34,13 +35,11 @@ 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 = {
@@ -86,7 +85,7 @@ const EntityCountTile = ({
const classes = useStyles({ type });
return (
<Link href={url} variant="body2">
<Link to={url} variant="body2">
<Box
className={`${classes.card} ${classes.entityTypeBox}`}
display="flex"
@@ -208,7 +207,7 @@ export const OwnershipCard = ({
counter={c.counter}
type={c.type}
name={c.name}
url={generatePath(`${catalogLink()}/?${c.queryParams}`)}
url={`${catalogLink()}/?${c.queryParams}`}
/>
</Grid>
))}