mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
style changes
This commit is contained in:
@@ -5,14 +5,13 @@ function display(seconds) {
|
||||
const hours = seconds / 3600;
|
||||
const minutes = (seconds % 3600) / 60;
|
||||
|
||||
if (hours < 1) return [minutes, seconds % 60].map(format).join(':');
|
||||
else return [hours, minutes, seconds % 60].map(format).join(':');
|
||||
return [hours, minutes, seconds % 60].map(format).join(':');
|
||||
}
|
||||
|
||||
export default function Countdown({ time, small }) {
|
||||
return (
|
||||
<div className={small ? styles.countdownClockSmall : styles.countdownClock}>
|
||||
{time === null ? '- -:- -' : display(time * 60)}
|
||||
{time === null ? '-- : -- : --' : display(time)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user