Front-end 'push' updates for SupplyRoutes

This commit is contained in:
Raffson
2022-06-15 02:21:35 +02:00
parent 74142536e9
commit e9917ba00e
8 changed files with 62 additions and 11 deletions

View File

@@ -56,8 +56,7 @@ export default function SupplyRoute(props: SupplyRouteProps) {
return (
<Polyline
positions={props.route.points}
color={color}
weight={weight}
pathOptions={{ color: color, weight: weight}}
ref={(ref) => (path.current = ref)}
>
<SupplyRouteTooltip {...props} />

View File

@@ -7,7 +7,7 @@ export default function SupplyRoutesLayer() {
const routes = useAppSelector(selectSupplyRoutes).routes;
return (
<LayerGroup>
{routes.map((route) => {
{Object.values(routes).map( route => {
return <SupplyRoute key={route.id} route={route} />;
})}
</LayerGroup>