aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Foiani <sotech117@michaels-mbp-3.lan>2021-04-20 01:16:05 -0400
committerMichael Foiani <sotech117@michaels-mbp-3.lan>2021-04-20 01:16:05 -0400
commitea432d2c59a1ef65343f2085bf4b02bd1937abcf (patch)
tree7506b46eb53fecca0672eb7f3a0bbd186578a697
parent9a670120b672996ce6865c0e3c66a49119e2b4a9 (diff)
Making the master frontend stable.
-rw-r--r--react-frontend/src/components/HubList.js7
-rw-r--r--react-frontend/src/components/HubSearch.js (renamed from react-frontend/src/components/Search.js)6
-rw-r--r--react-frontend/src/components/HubWidget.js21
3 files changed, 14 insertions, 20 deletions
diff --git a/react-frontend/src/components/HubList.js b/react-frontend/src/components/HubList.js
index 6d0b3e1..aab7c23 100644
--- a/react-frontend/src/components/HubList.js
+++ b/react-frontend/src/components/HubList.js
@@ -37,13 +37,6 @@ function HubList(props) {
// React hook that updates when the hubs are recalculated
useEffect(() => updateHubItems(), [props.data]);
- //React hook to show data for an investor
- useEffect(() => {
- setIsSelected(true);
- getName();
- console.log("DEVLOG");
- }, [props.selected]);
-
return <ul className='Checkin-list'>{hubItems}</ul>;
}
diff --git a/react-frontend/src/components/Search.js b/react-frontend/src/components/HubSearch.js
index 0698b01..2ae1a32 100644
--- a/react-frontend/src/components/Search.js
+++ b/react-frontend/src/components/HubSearch.js
@@ -5,14 +5,14 @@ import InvestorInfo from "./InvestorInfo.js";
// CSS import
import '../css/UserCheckin.css';
import Hub from "./HubList.js";
-import Search from "./Search.js";
+import Search from "./HubSearch.js";
/**
* Component that build the checkin list and displays checkin info.
* @returns {import('react').HtmlHTMLAttributes} A div with the hubs
* in a vertical layout.
*/
-function Search(props) {
+function HubSearch(props) {
const [queryString, setQueryString] = useState("");
const [displayedItems, setDisplayedItems] = useState([]);
@@ -56,4 +56,4 @@ function Search(props) {
);
}
-export default Search; \ No newline at end of file
+export default HubSearch; \ No newline at end of file
diff --git a/react-frontend/src/components/HubWidget.js b/react-frontend/src/components/HubWidget.js
index a4560fe..7707ee9 100644
--- a/react-frontend/src/components/HubWidget.js
+++ b/react-frontend/src/components/HubWidget.js
@@ -6,28 +6,29 @@ import InvestorInfo from "./InvestorInfo.js";
// CSS import
import '../css/UserCheckin.css';
import HubList from "./HubList.js";
-import Search from "./Search.js";
+import HubSearch from "./HubSearch.js";
/**
* Component that build the checkin list and displays checkin info.
* @returns {import('react').HtmlHTMLAttributes} A div with the hubs
* in a vertical layout.
*/
-function HudWidget(props) {
+function HubWidget(props) {
return (
- <div className="User-checkin">
- <div className="Checkins">
- <h2>Suspicion Ranks</h2>
- <HubList setHasLoaded={props.setHasLoaded} data={props.data} setSelected={props.setSelected} selected={props.selected} dates={props.dates}></HubList>
+ <>
+ <div className="User-checkin">
+ <div className="Checkins">
+ <h2>Suspicion Ranks</h2>
+ <HubList setHasLoaded={props.setHasLoaded} data={props.data} setSelected={props.setSelected} selected={props.selected} dates={props.dates}></HubList>
+ </div>
+ <HubSearch data={props.data}></HubSearch>
</div>
- <Search></Search>
<InvestorInfo
personId={props.selected}
- isSelected={isSelected}
- name={name}
+ selectedId={props.selected}
dates={props.dates}
></InvestorInfo>
- </div>
+ </>
);
}