aboutsummaryrefslogtreecommitdiff
path: root/react-frontend/src/components/HubWidget.js
blob: a4560fe3dd307200ab9493d80c70e90aa7ea217d (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
// 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 Search from "./Search.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) {
  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>
      <Search></Search>
      <InvestorInfo
        personId={props.selected}
        isSelected={isSelected}
        name={name}
        dates={props.dates}
      ></InvestorInfo>
    </div>
  );
}

export default HubWidget;