code refactoring

This commit is contained in:
2024-08-20 19:04:10 +02:00
parent 3205711bb1
commit 25210ccc22
2 changed files with 10 additions and 3 deletions

View File

@@ -99,10 +99,18 @@ const LiveStreamMonitorView: React.FC = () => {
{mapStatusToChip(progress[k].Status)}
</TableCell>
<TableCell align='right'>
{formatMicro(Number(progress[k].WaitTime))}
{/* TODO: change to enum */}
{progress[k].Status === 0
? formatMicro(Number(progress[k].WaitTime))
: "-"
}
</TableCell>
<TableCell align='right'>
{new Date(progress[k].LiveDate).toLocaleString()}
{/* TODO: change to enum */}
{progress[k].Status === 0
? new Date(progress[k].LiveDate).toLocaleString()
: "-"
}
</TableCell>
<TableCell align='right'>
<Button variant='contained' size='small' onClick={() => stop(k)}>

View File

@@ -152,7 +152,6 @@ func (l *LiveStream) monitorStartTime(r io.Reader, doneWait chan struct{}) {
}
const TRIES = 5
/*
if it's waiting a livestream the 5th line will indicate the time to live
its a dumb and not robust method.