chore: remove occurrences of the rule of hooks to favour wrapping the components instead
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -48,13 +48,16 @@ const generatedColumns: TableColumn[] = [
|
||||
field: 'message',
|
||||
highlight: true,
|
||||
render: (row: Partial<WorkflowRun>) => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
const routeLink = useRouteRef(buildRouteRef);
|
||||
return (
|
||||
<Link component={RouterLink} to={routeLink({ id: row.id! })}>
|
||||
{row.message}
|
||||
</Link>
|
||||
);
|
||||
const LinkWrapper: React.FC<{}> = () => {
|
||||
const routeLink = useRouteRef(buildRouteRef);
|
||||
return (
|
||||
<Link component={RouterLink} to={routeLink({ id: row.id! })}>
|
||||
{row.message}
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
return <LinkWrapper />;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user