diff --git a/plugins/circleci/src/components/BuildsPage/lib/CITable/CITable.tsx b/plugins/circleci/src/components/BuildsPage/lib/CITable/CITable.tsx index 510fd20dac..53cbc754cf 100644 --- a/plugins/circleci/src/components/BuildsPage/lib/CITable/CITable.tsx +++ b/plugins/circleci/src/components/BuildsPage/lib/CITable/CITable.tsx @@ -146,19 +146,22 @@ const generatedColumns: TableColumn[] = [ highlight: true, width: '20%', render: (row: Partial) => { - // eslint-disable-next-line react-hooks/rules-of-hooks - const routeLink = useRouteRef(circleCIBuildRouteRef); + const LinkWrapper = () => { + const routeLink = useRouteRef(circleCIBuildRouteRef); - return ( - - {row.buildName ? row.buildName : row?.workflow?.name} - - ); + return ( + + {row.buildName ? row.buildName : row?.workflow?.name} + + ); + }; + + return ; }, }, { diff --git a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx index aefa140349..d79d481cd4 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx +++ b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx @@ -56,17 +56,20 @@ const generatedColumns: TableColumn[] = [ highlight: true, width: '200px', render: (row: Partial) => { - // eslint-disable-next-line react-hooks/rules-of-hooks - const routeLink = useRouteRef(buildRouteRef); - return ( - - {row.message} - - ); + const LinkWrapper = () => { + const routeLink = useRouteRef(buildRouteRef); + return ( + + {row.message} + + ); + }; + + return ; }, }, { diff --git a/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx b/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx index d80ecc5d52..2506613e0c 100644 --- a/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx +++ b/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx @@ -48,13 +48,16 @@ const generatedColumns: TableColumn[] = [ field: 'message', highlight: true, render: (row: Partial) => { - // eslint-disable-next-line react-hooks/rules-of-hooks - const routeLink = useRouteRef(buildRouteRef); - return ( - - {row.message} - - ); + const LinkWrapper = () => { + const routeLink = useRouteRef(buildRouteRef); + return ( + + {row.message} + + ); + }; + + return ; }, }, { diff --git a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx index 7a7b77f5dc..39187fe859 100644 --- a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx +++ b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx @@ -92,30 +92,33 @@ const generatedColumns: TableColumn[] = [ field: 'fullName', highlight: true, render: (row: Partial) => { - // eslint-disable-next-line react-hooks/rules-of-hooks - const routeLink = useRouteRef(buildRouteRef); - if (!row.fullName || !row.lastBuild?.number) { - return ( - <> - {row.fullName || - row.fullDisplayName || - row.displayName || - 'Unknown'} - - ); - } + const LinkWrapper = () => { + const routeLink = useRouteRef(buildRouteRef); + if (!row.fullName || !row.lastBuild?.number) { + return ( + <> + {row.fullName || + row.fullDisplayName || + row.displayName || + 'Unknown'} + + ); + } - return ( - - {row.fullDisplayName} - - ); + return ( + + {row.fullDisplayName} + + ); + }; + + return ; }, }, {