From 2371c6aee9229a83d56ce1b899878ccb7e0b5d0a Mon Sep 17 00:00:00 2001 From: Juan Carlos Miranda Carruana Date: Sat, 14 May 2022 23:49:59 +0200 Subject: [PATCH] feature/watchlist: putting back the navigate function in live search results --- Frontend/src/components/common/SearchResultsTable.jsx | 5 +++-- .../src/components/screens/Dashboard/AllocationGraph.jsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Frontend/src/components/common/SearchResultsTable.jsx b/Frontend/src/components/common/SearchResultsTable.jsx index 2bed3183..1829ac42 100644 --- a/Frontend/src/components/common/SearchResultsTable.jsx +++ b/Frontend/src/components/common/SearchResultsTable.jsx @@ -32,7 +32,7 @@ const SearchResultsTable = props => { return isAssetInWatchList; } - let navigate = useNavigate(); + const navigate = useNavigate(); const routeChange = path => { navigate(path); } @@ -126,7 +126,8 @@ const SearchResultsTable = props => { {routeChange(`../activities/addActivity/${element.assetType}/${element.symbol}/${element.name}`)}} + onClick={() => { + routeChange(`../activities/addActivity/${element.assetType}/${element.symbol}/${element.name}`)}} > { })(); const valueData = (() => { - let valueData = [] + let valueData = []; assets.forEach(element => { valueData.push(parseFloat(element.value).toFixed(2)); });