Add name for point popup

dev
Platon Yasev 3 years ago
parent cad79fe0c0
commit 60afc8d076

@ -37,6 +37,9 @@ const useRateValue = (feature) => {
};
const pointConfig = [
{
field: "name",
},
{
field: "category",
name: "Тип",
@ -77,12 +80,20 @@ export const MapPopup = ({ feature, lat, lng, onClose }) => {
return (
<Row className={twMerge("p-1")} key={item.field ?? "rate"}>
<Col span={layout.keyCol} className={"font-semibold"}>
{item.name}
</Col>
<Col span={layout.valueCol}>
{item.formatter ? item.formatter(value) : value}
</Col>
{item.field === "name" ? (
<Col span={24} className={"font-semibold text-center"}>
{value}
</Col>
) : (
<>
<Col span={layout.keyCol} className={"font-semibold"}>
{item.name}
</Col>
<Col span={layout.valueCol}>
{item.formatter ? item.formatter(value) : value}
</Col>
</>
)}
</Row>
);
})}

Loading…
Cancel
Save