// React and component imports
import { useEffect, useState } from "react";
import Hub from "./Hub.js";
import uuid from 'react-uuid';
// CSS import
import "../css/UserCheckin.css";
/**
* Component that build the checkin list and displays checkin info.
* @returns {import('react').HtmlHTMLAttributes} A div with the hubs
* in a vertical layout.
*/
function HubList(props) {
const [displayedItems, setDisplayedItems] = useState([]);
/**
* Method that determines whehter the Hub should be showed.
* @returns {Boolean} True if to be shown, false if not.
*/
const toInclude = holder => {
// TODO: add number search or differentiate between it
// TODO: add sus score range....
if (!holder) {
return false;
};
// const matchingId = holder.id.toString().includes(queryString.toLowerCase());
//console.log(props.queryString.toLowerCase(), props.data.length);
const matchingName = holder.name.toLowerCase().includes(props.queryString.toLowerCase());
return matchingName;
}
const toHubElement = hub =>