mirror of
https://github.com/fergalmoran/kidarr-server.git
synced 2025-12-22 09:17:51 +00:00
Add pings back to map
This commit is contained in:
@@ -27,26 +27,23 @@ const MainMap: React.FC<MainMapProps> = ({ kids }) => {
|
|||||||
zoom={10}
|
zoom={10}
|
||||||
scrollWheelZoom={true}
|
scrollWheelZoom={true}
|
||||||
>
|
>
|
||||||
<TileLayer url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png">
|
<TileLayer url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" />
|
||||||
<>
|
{kids?.map((kid) =>
|
||||||
{kids?.map((kid) =>
|
kid.devices?.map((device) =>
|
||||||
kid.devices?.map((device) =>
|
device.pings.map((ping) => (
|
||||||
device.pings.map((ping) => (
|
<MapMarker
|
||||||
<MapMarker
|
key={ping.id}
|
||||||
key={ping.id}
|
deviceId={device.id}
|
||||||
deviceId={device.id}
|
childName={kid.name}
|
||||||
childName={kid.name}
|
avatar={kid.avatar}
|
||||||
avatar={kid.avatar}
|
deviceName={device.name}
|
||||||
deviceName={device.name}
|
latitude={ping.latitude}
|
||||||
latitude={ping.latitude}
|
longitude={ping.longitude}
|
||||||
longitude={ping.longitude}
|
timestamp={ping.timestamp}
|
||||||
timestamp={ping.timestamp}
|
/>
|
||||||
/>
|
)),
|
||||||
)),
|
),
|
||||||
),
|
)}
|
||||||
)}
|
|
||||||
</>
|
|
||||||
</TileLayer>
|
|
||||||
</MapContainer>
|
</MapContainer>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user