import { useState, useEffect } from "react"; import seiki from "../../assets/images/seiki.png"; import { BsSearch, BsChevronDown } from "react-icons/bs"; import { FaMapLocationDot, FaLocationDot } from "react-icons/fa6"; import { AiFillCar, AiFillDatabase } from "react-icons/ai"; import { RiDashboardFill } from "react-icons/ri"; import { IoFootstepsSharp, IoStatsChartSharp } from "react-icons/io5"; import { FaBusAlt, FaInfoCircle, FaMapMarkedAlt } from "react-icons/fa"; import { Poi } from "../../redux/types/Poi"; import FootfallSection from "../footfall"; type DrawerSectionProps = { poiList: Poi[]; setSelectedPoi: React.Dispatch>; isFootfallSection: boolean; setFootfallSection: React.Dispatch>; isModeSection: boolean; setModeSection: React.Dispatch>; isDemographicsSection: boolean; setDemographicsSection: React.Dispatch>; isInformationSection: boolean; setInformationSection: React.Dispatch>; isTraficSection: boolean; setTraficSection: React.Dispatch>; isMapView: boolean; setIsMapView: React.Dispatch>; }; const DrawerSection: React.FC = ({ poiList, setSelectedPoi, isFootfallSection, setFootfallSection, isModeSection, setModeSection, isDemographicsSection, setDemographicsSection, isInformationSection, setInformationSection, isTraficSection, setTraficSection, isMapView, setIsMapView, }) => { const [open, setOpen] = useState(true); const [submenuOpen, setSubmenuOpen] = useState(false); const Menus = [ { title: "Points of interest", icon: , submenu: true, submenuItems: poiList, }, { title: "Footfall", icon: , }, { title: "Mode", icon: , }, { title: "Demographics", icon: , }, { title: "Section info", icon: , }, { title: "Trafic data", icon: , }, ]; return (
setOpen(!open)} />

seiki

  • Points of interest {open && ( { setSubmenuOpen(!submenuOpen); }} /> )}
  • {submenuOpen && open && (
      {Menus[0].submenuItems ? ( Menus[0].submenuItems.map((submenuItem, index) => (
    • { setSelectedPoi(submenuItem); }} key={index} className="text-gray-300 text-sm flex items-center gap-x-4 cursor-pointer p-2 px-5 hover:bg-light-white rounded-md" style={{ fontFamily: "airbnb_light" }} > {submenuItem.address}
    • )) ) : ( <> )}
    )}
  • { setFootfallSection(!isFootfallSection); }} > Footfall
  • { setModeSection(!isModeSection); }} > Mode
  • { setDemographicsSection(!isDemographicsSection); }} > Demographics
  • { setInformationSection(!isInformationSection); }} > Section info
  • { setTraficSection(!isTraficSection); }} > Trafic data
  • { setIsMapView(!isMapView); }} > Map View
); }; export default DrawerSection;