aboutsummaryrefslogtreecommitdiff
path: root/react-frontend/src/components/HubWidget.js
blob: de0ae3215f42f6fff8b32d126eb9772a70cbc71b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// React and component imports
import { useEffect, useState } from "react";
import Hub from "./Hub.js";
import InvestorInfo from "./InvestorInfo.js";

// CSS import
import '../css/UserCheckin.css';
import HubList from "./HubList.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 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>
        <HubSearch data={props.data}></HubSearch>
      </div>
      <InvestorInfo
        personId={props.selected}
        selectedId={props.selectedId}
        dates={props.dates}
      ></InvestorInfo>
    </>
  );
}

export default HubWidget;