diff options
author | Michael Foiani <sotech117@michaels-mbp-3.lan> | 2021-04-16 18:55:40 -0400 |
---|---|---|
committer | Michael Foiani <sotech117@michaels-mbp-3.lan> | 2021-04-16 18:55:40 -0400 |
commit | 79cf63694077d0835a62b9833d31f3c263cdccd9 (patch) | |
tree | 569f1a679567576e0924cb3cd989337625a6e447 /maps-frontend/src/components/InvestorInfo.js | |
parent | 868c250d5c9ab45be1c5a478d2ff5cd82ec60f2d (diff) |
Working version without the feature to see data on a certain ceo.
Diffstat (limited to 'maps-frontend/src/components/InvestorInfo.js')
-rw-r--r-- | maps-frontend/src/components/InvestorInfo.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/maps-frontend/src/components/InvestorInfo.js b/maps-frontend/src/components/InvestorInfo.js index 24994d0..d368984 100644 --- a/maps-frontend/src/components/InvestorInfo.js +++ b/maps-frontend/src/components/InvestorInfo.js @@ -14,15 +14,16 @@ function InvestorInfo(props) { const toEpochMilli = date => Date.parse(date); const getInfo = () => { - if (props.name === "") { - return; - } - console.log({ person: props.name, start: toEpochMilli(props.dates.start), end: toEpochMilli(props.dates.end) }); + + if (props.name === "") { + return; + } + fetch("http://localhost:4567/profit", { method: "POST", body: JSON.stringify({ @@ -53,13 +54,13 @@ function InvestorInfo(props) { </li> );*/ - useEffect(() => getInfo(), [props.name]) + useEffect(() => getInfo(), [props.name, props.isSelected, props.personId]) -return ( - <div className="Chosen-user"> - hi - </div> -); + return ( + <div className="Chosen-user" hidden={props.isSelected}> + hi + </div> + ); } export default InvestorInfo;
\ No newline at end of file |