From 075b2c84066f973e172a71d2ae7d89cd394408bb Mon Sep 17 00:00:00 2001 From: Montassar Ghanmy Date: Tue, 5 Mar 2024 09:18:21 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20router=20directory=20row?= =?UTF-8?q?=20(#409)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/app/views/client/body/drive/browser.tsx | 6 +++--- .../src/app/views/client/body/drive/header-path.tsx | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tdrive/frontend/src/app/views/client/body/drive/browser.tsx b/tdrive/frontend/src/app/views/client/body/drive/browser.tsx index 2cde4fde..fe429ba4 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/browser.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/browser.tsx @@ -383,9 +383,9 @@ export default memo( } item={child} onClick={() => { - // const route = RouterServices.generateRouteFromState({dirId: child.id}); - // history.push(route); - return setParentId(child.id); + const route = RouterServices.generateRouteFromState({dirId: child.id}); + history.push(route); + //return setParentId(child.id); }} checked={checked[child.id] || false} onCheck={v => diff --git a/tdrive/frontend/src/app/views/client/body/drive/header-path.tsx b/tdrive/frontend/src/app/views/client/body/drive/header-path.tsx index 18f81433..09761f4f 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/header-path.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/header-path.tsx @@ -33,14 +33,15 @@ export default ({ inTrash={inTrash || false} path={path} onClick={(viewId, dirId) => { - /*history.push( + history.push( RouterServices.generateRouteFromState({ companyId: company, viewId, dirId, }), - );*/ - setParentId(dirId ? dirId : viewId); + ); + console.log("viewId changed now setting the parentId") + // setParentId(dirId ? dirId : viewId); }} /> );