From 8ee168f1050d70a0dd962aa269c61935f85994a6 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 10 Aug 2024 23:29:39 +0200 Subject: [PATCH] duration --- src/App.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 6bcdac8..f080165 100644 --- a/src/App.js +++ b/src/App.js @@ -91,8 +91,13 @@ function App() { if (response.acceleration !== undefined) setAcceleration(response.acceleration); + /* if (response.duration !== undefined) - form.setFieldValue("duration", response.duration); + form.setFieldValue("duration", { + $s: response.duration % 60, + $m: Math.floor(response.duration / 60) % 60, + $H: Math.floor(response.duration / 3600), + }); */ if (response.distance !== undefined) setDistance(response.distance); if (response.direction !== undefined) setDirection(response.direction);