From 9d04e0991675852d88fb78f87d1c957bed5806df Mon Sep 17 00:00:00 2001 From: ArthurEncr Date: Tue, 16 May 2023 11:05:15 -0300 Subject: [PATCH 1/2] fix: fixing breadcrumb link --- frontend/src/views/Seedlot/SeedlotDetails/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/Seedlot/SeedlotDetails/index.tsx b/frontend/src/views/Seedlot/SeedlotDetails/index.tsx index 094ae557e..e71498e2c 100644 --- a/frontend/src/views/Seedlot/SeedlotDetails/index.tsx +++ b/frontend/src/views/Seedlot/SeedlotDetails/index.tsx @@ -78,7 +78,7 @@ const SeedlotDetails = () => { navigate('/seedlot')}>Seedlots - My seedlots + navigate('/seedlot/my-seedlots')}>My seedlots From 5bb7287a2ae7bbb79d45a39e5de3d9dbd8343dc9 Mon Sep 17 00:00:00 2001 From: ArthurEncr Date: Tue, 16 May 2023 11:15:14 -0300 Subject: [PATCH 2/2] fix: fixing open seedlot details screen when click on table --- .../src/views/Seedlot/MySeedlots/SeedlotDataTable/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Seedlot/MySeedlots/SeedlotDataTable/index.tsx b/frontend/src/views/Seedlot/MySeedlots/SeedlotDataTable/index.tsx index b2478afbc..38e607d12 100644 --- a/frontend/src/views/Seedlot/MySeedlots/SeedlotDataTable/index.tsx +++ b/frontend/src/views/Seedlot/MySeedlots/SeedlotDataTable/index.tsx @@ -1,5 +1,6 @@ /* eslint-disable react/jsx-props-no-spreading */ import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import { DataTable, @@ -51,7 +52,10 @@ const SeedlotDataTable = ({ seedlots }: SeedlotDataTableProps) => { setFirstRowIndex(pageSize * (page - 1)); }; + const navigate = useNavigate(); + return ( + <> { {rows.map((item: RowInterface) => ( - + navigate(`/seedlot/details/${item.cells[0].value}`)}> {item.cells[0].value} {`${item.cells[1].value} class`} {item.cells[2].value.label}