import { Popup } from "react-map-gl"; import { Button, Col, Row } from "antd"; import { twMerge } from "tailwind-merge"; import { TYPE_MAPPER } from "../config"; import { usePointSelection } from "../stores/usePointSelection"; const pointConfig = [ { field: "name", }, { field: "category", name: "Тип", formatter: (value) => TYPE_MAPPER[value], }, { name: "Востребованность, у.е.", formatter: (value) => Math.round(value), }, ]; export const MapPopup = ({ feature, lat, lng, onClose }) => { const { include, selection, exclude } = usePointSelection(); const isSelected = selection.included.has(feature.properties.id); const handleSelect = () => isSelected ? exclude(feature.properties.id) : include(feature.properties.id); return (
{Object.entries(feature.properties).map(([key, value]) => { return ( {key} {value} ); })}
); };