File tree Expand file tree Collapse file tree
src/components/systems/partials Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from "react" ;
2- import { useTranslation } from "react-i18next" ;
3- import { renderValidDate } from "../../../utils/dateUtils" ;
42import { Service } from "../../../slices/serviceSlice" ;
3+ import moment from "moment" ;
54
65/**
76 * This component renders the mean queue time cells of systems in the table view
@@ -11,11 +10,10 @@ const MeanQueueTimeCell = ({
1110} : {
1211 row : Service
1312} ) => {
14- const { t } = useTranslation ( ) ;
1513
1614 return (
1715 < span >
18- { t ( "dateFormats.time.medium" , { time : renderValidDate ( row . meanQueueTime . toString ( ) ) } ) }
16+ { moment . utc ( moment . duration ( row . meanQueueTime * 1000 ) . asMilliseconds ( ) ) . format ( "HH:mm:ss" ) }
1917 </ span >
2018 ) ;
2119} ;
Original file line number Diff line number Diff line change 11import React from "react" ;
2- import { useTranslation } from "react-i18next" ;
3- import { renderValidDate } from "../../../utils/dateUtils" ;
42import { Service } from "../../../slices/serviceSlice" ;
3+ import moment from "moment" ;
54
65/**
76 * This component renders the mean run time cells of systems in the table view
@@ -11,11 +10,10 @@ const MeanRunTimeCell = ({
1110} : {
1211 row : Service
1312} ) => {
14- const { t } = useTranslation ( ) ;
1513
1614 return (
1715 < span >
18- { t ( "dateFormats.time.medium" , { time : renderValidDate ( row . meanRunTime . toString ( ) ) } ) }
16+ { moment . utc ( moment . duration ( row . meanRunTime * 1000 ) . asMilliseconds ( ) ) . format ( "HH:mm:ss" ) }
1917 </ span >
2018 ) ;
2119} ;
You can’t perform that action at this time.
0 commit comments