import React, { useState, useEffect } from "react"; import { useDispatch } from "react-redux"; import { fetchPoiRequest } from "./redux/actions/poiActions"; import { poiList } from "./data/data"; import { Poi } from "./redux/types/Poi"; import DropDown from "./components/generalInformation/dropdown/DropDown"; import DemographicsSection from "./sections/demographics"; import FootfallSection from "./sections/footfall"; import ModeSection from "./sections/mode"; import DescriptionSection from "./sections/description"; import InformationSection from "./sections/information"; import DrawerSection from "./sections/drawer"; import TraficSection from "./sections/trafic"; import MapSection from "./sections/map"; import GraphSections from "./components/main/GraphSections"; import "./styles/global/App.css"; import "./styles/global/customScrollBar.css"; const App = () => { const [selectedPoi, setSelectedPoi] = useState(poiList.items[0]); const [isFootfallSection, setFootfallSection] = useState(true); const [isModeSection, setModeSection] = useState(true); const [isDemographicsSection, setDemographicsSection] = useState(true); const [isInformationSection, setInformationSection] = useState(true); const [isTraficSection, setTraficSection] = useState(true); const [isMapView, setIsMapView] = useState(false); const dispatch = useDispatch(); useEffect(() => { dispatch(fetchPoiRequest()); }, [dispatch]); return (
{isMapView ? ( ) : (


)}
); }; export default App;