Prefer Link over plain anchors
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/plugin-apache-airflow': patch
|
||||
'@backstage/plugin-azure-sites': patch
|
||||
'@backstage/plugin-lighthouse': patch
|
||||
---
|
||||
|
||||
Prefer Link over plain anchors
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
Link,
|
||||
Progress,
|
||||
StatusError,
|
||||
StatusOK,
|
||||
@@ -144,13 +145,14 @@ export const DenseTable = ({ dags, rowClick }: DenseTableProps) => {
|
||||
{
|
||||
title: 'Link',
|
||||
field: 'dagUrl',
|
||||
render: (row: Partial<DagTableRow>) => (
|
||||
<a href={row.dagUrl}>
|
||||
<IconButton aria-label="details">
|
||||
<OpenInBrowserIcon />
|
||||
</IconButton>
|
||||
</a>
|
||||
),
|
||||
render: (row: Partial<DagTableRow>) =>
|
||||
!row.dagUrl ? null : (
|
||||
<Link to={row.dagUrl}>
|
||||
<IconButton aria-label="details">
|
||||
<OpenInBrowserIcon />
|
||||
</IconButton>
|
||||
</Link>
|
||||
),
|
||||
width: '5%',
|
||||
disableClick: true,
|
||||
hidden: hiddenColumns.some(field => field === 'dagUrl'),
|
||||
|
||||
+2
-3
@@ -164,9 +164,8 @@ const ActionButtons = ({
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem
|
||||
component="a"
|
||||
href={value.logstreamHref}
|
||||
target="_blank"
|
||||
component={Link}
|
||||
to={value.logstreamHref}
|
||||
key="logStream"
|
||||
onClick={handleClose}
|
||||
>
|
||||
|
||||
@@ -22,6 +22,7 @@ import LighthouseSupportButton from '../SupportButton';
|
||||
import {
|
||||
ContentHeader,
|
||||
InfoCard,
|
||||
Link,
|
||||
MarkdownContent,
|
||||
} from '@backstage/core-components';
|
||||
|
||||
@@ -108,10 +109,9 @@ function GettingStartedCard() {
|
||||
<Grid container direction="row" justifyContent="flex-end">
|
||||
<Grid item>
|
||||
<Button
|
||||
component="a"
|
||||
href="https://github.com/spotify/lighthouse-audit-service"
|
||||
component={Link}
|
||||
to="https://github.com/spotify/lighthouse-audit-service"
|
||||
size="small"
|
||||
target="_blank"
|
||||
>
|
||||
Check out the README
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user