From d798737f0c5e00ef39b8695297f41d93922b3ad5 Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Tue, 20 Apr 2021 01:01:02 -0400 Subject: Quick search feature and some restructuring. --- react-frontend/src/components/HubList.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'react-frontend/src/components/HubList.js') diff --git a/react-frontend/src/components/HubList.js b/react-frontend/src/components/HubList.js index c9a5156..fe47457 100644 --- a/react-frontend/src/components/HubList.js +++ b/react-frontend/src/components/HubList.js @@ -13,8 +13,6 @@ import '../css/UserCheckin.css'; */ function HubList(props) { const [hubItems, setHubItems] = useState([]); - const [isSelected, setIsSelected] = useState(false); - const [name, setName] = useState(''); /** * Loads new the checkins into the current cache/map of hubs. @@ -30,15 +28,6 @@ function HubList(props) { setHubItems(hubs); } - const getName = () => { - props.data.forEach(hub => { - if (hub.id === props.selected) { - setName(hub.name); - } - }) - setName(''); - } - // React hook that updates when the hubs are recalculated useEffect(() => updateHubItems(), [props.data]); @@ -49,15 +38,7 @@ function HubList(props) { getName(); }, [props.selected]); - return ( -
-
-

Suspicion Ranks

-
    {hubItems}
-
- -
- ); + return ; } export default HubList; \ No newline at end of file -- cgit v1.2.3-70-g09d2