mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
refactor: operator design review
This commit is contained in:
committed by
Carlos Valente
parent
fdd81354cc
commit
629204810f
@@ -3,7 +3,9 @@
|
||||
*/
|
||||
|
||||
import { MaybeNumber } from 'ontime-types';
|
||||
import { millisToString, removeLeadingZero, removeSeconds } from 'ontime-utils';
|
||||
import { removeLeadingZero, removeSeconds } from 'ontime-utils';
|
||||
|
||||
import { formatedTime } from '../../../overview/overviewUtils';
|
||||
|
||||
interface RunningTimeProps {
|
||||
value: MaybeNumber;
|
||||
@@ -14,7 +16,7 @@ interface RunningTimeProps {
|
||||
|
||||
export default function RunningTime(props: RunningTimeProps) {
|
||||
const { value, hideSeconds, hideLeadingZero, className } = props;
|
||||
let formattedTime = millisToString(value);
|
||||
let formattedTime = formatedTime(value, hideSeconds || hideLeadingZero ? 2 : 3);
|
||||
|
||||
if (hideLeadingZero) {
|
||||
formattedTime = removeLeadingZero(formattedTime);
|
||||
|
||||
Reference in New Issue
Block a user