aboutsummaryrefslogtreecommitdiff
path: root/react-frontend/src/components/InvestorInfo.js
diff options
context:
space:
mode:
Diffstat (limited to 'react-frontend/src/components/InvestorInfo.js')
-rw-r--r--react-frontend/src/components/InvestorInfo.js28
1 files changed, 26 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>
);
}