Prefer Link over plain anchors

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-02-14 10:21:48 +01:00
parent 49c710940f
commit 4bdd6bcb3c
4 changed files with 21 additions and 13 deletions
@@ -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'),