From 35cac0da401e37d3d963f55fec1118c21f377474 Mon Sep 17 00:00:00 2001 From: andrei Date: Mon, 7 Oct 2024 21:52:36 +0500 Subject: [PATCH] ._. --- src/components/DeliveryOrdersList.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/DeliveryOrdersList.jsx b/src/components/DeliveryOrdersList.jsx index ad79302..55c671c 100644 --- a/src/components/DeliveryOrdersList.jsx +++ b/src/components/DeliveryOrdersList.jsx @@ -31,7 +31,10 @@ const DeliveryOrdersList = ({ }; const formatTimeInHours = (minutes) => { - return (minutes / 60).toFixed(2); + if (!minutes || minutes === 0) { + return "ещё не рассчитывалось"; + } + return (minutes / 60).toFixed(2) + " час."; }; return ( @@ -50,8 +53,8 @@ const DeliveryOrdersList = ({

Подзаказ #{index + 1}

- Время на подзаказ: - {formatTimeInHours(order.estimated_route_time_in_minutes)} час. + Время на подзаказ:{" "} + {formatTimeInHours(order.estimated_route_time_in_minutes)}