Add name for point popup

dev
Platon Yasev 3 years ago
parent cad79fe0c0
commit 60afc8d076

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

Loading…
Cancel
Save