diff options
author | Michael Foiani <sotech117@michaels-mbp-3.lan> | 2021-04-20 03:37:09 -0400 |
---|---|---|
committer | Michael Foiani <sotech117@michaels-mbp-3.lan> | 2021-04-20 03:37:09 -0400 |
commit | 30cf6cfc8e1dac90d4b95e2d880fbee0d2831a97 (patch) | |
tree | 435441df93d7fb657c4386e3b57a3ec2282dab57 /react-frontend/src | |
parent | 629c77c110042d5160f5218bee54f76b81c4dad2 (diff) | |
parent | 7065fd986a523e1bd5c6eac82037558ad3887daf (diff) |
Merge branch 'master' of https://github.com/cs0320-2021/term-project-cohwille-jmccaul3-mfoiani-rhunt2
Merging clark's plot.
Diffstat (limited to 'react-frontend/src')
-rw-r--r-- | react-frontend/src/components/InvestorInfo.js | 28 | ||||
-rw-r--r-- | react-frontend/src/css/InvesterInfo.css | 46 |
2 files changed, 72 insertions, 2 deletions
diff --git a/react-frontend/src/components/InvestorInfo.js b/react-frontend/src/components/InvestorInfo.js index ca6e501..2a0f0d9 100644 --- a/react-frontend/src/components/InvestorInfo.js +++ b/react-frontend/src/components/InvestorInfo.js @@ -3,6 +3,7 @@ import { useEffect, useState } from "react"; // CSS import import "../css/UserCheckin.css"; +import "../css/InvesterInfo.css"; /** * Componenet for checkins. Has a toggle to show more info. @@ -20,7 +21,7 @@ function InvestorInfo(props) { end: toEpochMilli(props.dates.end), }); - if (props.name === "Mathews Krista Jean") { + if (props.name === "") { return; } @@ -54,11 +55,34 @@ function InvestorInfo(props) { </li> );*/ + const stockTable = () => { + return ( + <div id="stockTable"> + <div className="tableHeader"> + <div className="symbol-row">Symbol</div> + <div className="gain-row">Realized gain</div> + <div className="gain-row">Unrealized gain</div> + </div> + </div> + ); + }; + useEffect(() => getInfo(), [props.name, props.isSelected, props.personId]); return ( <div className="Chosen-user" hidden={false}> - hi + <h2 id="investerName">{"CRUTCHFIELD BRADFORD"}</h2> + <div id="top-bar"> + <div id="gain-number"> + <p className="bigNumber">{583}$</p> gain + </div> + + <div> + <p className="bigNumber">{2.8}%</p> + compared to {1.2}% on SP500 + </div> + </div> + {stockTable()} </div> ); } diff --git a/react-frontend/src/css/InvesterInfo.css b/react-frontend/src/css/InvesterInfo.css new file mode 100644 index 0000000..5385965 --- /dev/null +++ b/react-frontend/src/css/InvesterInfo.css @@ -0,0 +1,46 @@ +#top-bar { + display: flex; + flex-direction: row; + justify-content: space-evenly; + margin-bottom: 10px; + margin-right: 10px; + margin-left: 10px; + border-bottom: solid 1px white; + margin-top: 0px; +} + +/* div { + border: solid white; +} */ + +/* p { + border: solid white; +} */ + +.bigNumber { + font-size: 25pt; + margin: 0; +} + +.Chosen-user { + background-color: #333333; + color: lightgreen; + width: 350px; + border-radius: 10px; +} + +.tableHeader { + display: flex; + flex-direction: row; + justify-content: left; + margin-right: 10px; + margin-left: 10px; +} + +.symbol-row { + margin-right: 20px; +} + +.gain-row { + margin-right: 20px; +} |