fix: issue with timer migration (#223)

* fix: issue with timer migration
This commit is contained in:
Carlos Valente
2022-10-17 15:20:56 +02:00
committed by GitHub
parent 766ff40baa
commit 2215319cd1
3 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime-ui",
"version": "1.9.0",
"version": "1.9.1",
"private": true,
"dependencies": {
"@chakra-ui/react": "^2.3.2",
+3 -2
View File
@@ -14,7 +14,7 @@ import { TableSettingsContext } from '../../common/context/TableSettingsContext'
import { useFetch } from '../../common/hooks/useFetch';
import useFullscreen from '../../common/hooks/useFullscreen';
import { useTimerProvider } from '../../common/hooks/useSocketProvider';
import { formatDisplay } from '../../common/utils/dateConfig';
import { formatDisplay, millisToSeconds } from '../../common/utils/dateConfig';
import { formatTime } from '../../common/utils/time';
import { tooltipDelayFast } from '../../ontimeConfig';
@@ -36,7 +36,8 @@ export default function TableHeader({handleCSVExport, featureData}) {
}`;
// prepare presentation variables
const timerNow = `${timer.running < 0 ? '-' : ''}${formatDisplay(timer.running)}`;
const isOvertime = timer.current < 0;
const timerNow = `${isOvertime ? '-' : ''}${formatDisplay(millisToSeconds(timer.current))}`;
const timeNow = formatTime(timer.clock, {
showSeconds: true,
format: 'hh:mm:ss a',
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime",
"version": "1.9.0",
"version": "1.9.1",
"author": "Carlos Valente",
"description": "Time keeping for live events",
"repository": "https://github.com/cpvalente/ontime",