From 0c43e49bb4541d0dd577cb4536f395f2dc3aa56f Mon Sep 17 00:00:00 2001 From: gluap Date: Tue, 8 Mar 2022 22:21:37 +0100 Subject: [PATCH] do not convert "count" into km/h while converting speeds. --- frontend/src/pages/MapPage/RoadInfo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/MapPage/RoadInfo.tsx b/frontend/src/pages/MapPage/RoadInfo.tsx index 8bb5b25..1d1a0b5 100644 --- a/frontend/src/pages/MapPage/RoadInfo.tsx +++ b/frontend/src/pages/MapPage/RoadInfo.tsx @@ -40,7 +40,7 @@ function RoadStatsTable({data}) { {LABELS[prop]} {['count', 'min', 'median', 'max', 'mean'].map((stat) => ( - {((data[prop]?.statistics?.[stat]) * (prop === `speed` ? 3.6 : 1)).toFixed(stat === 'count' ? 0 : 2)} + {((data[prop]?.statistics?.[stat]) * ((prop === `speed` && stat != 'count') ? 3.6 : 1)).toFixed(stat === 'count' ? 0 : 2)} ))} {UNITS[prop]}