* feat/120: calculate delay to single event
* feat/120 Countdown
* feat/120 prevent parsing NaN
* feat/120: version bump
* feat/120: update README.md
* feat/120: show delayed countdown timer
This commit is contained in:
Carlos Valente
2022-06-30 20:26:01 +02:00
committed by GitHub
parent dcc534f92b
commit f4c5a2bf87
20 changed files with 543 additions and 31 deletions
@@ -2,9 +2,9 @@ import React, { memo } from 'react';
import { formatDisplay } from 'common/utils/dateConfig';
import PropTypes from 'prop-types';
import styles from './Countdown.module.scss';
import styles from './TimerDisplay.module.scss';
const Countdown = ({ time, small, isNegative, hideZeroHours }) => {
const TimerDisplay = ({ time, small, isNegative, hideZeroHours }) => {
// prepare display string
const display =
time != null && !isNaN(time) ? formatDisplay(time, hideZeroHours) : '-- : -- : --';
@@ -19,9 +19,9 @@ const Countdown = ({ time, small, isNegative, hideZeroHours }) => {
);
};
export default memo(Countdown);
export default memo(TimerDisplay);
Countdown.propTypes = {
TimerDisplay.propTypes = {
time: PropTypes.number,
small: PropTypes.bool,
isNegative: PropTypes.bool,
@@ -6,6 +6,7 @@ const navigatorConstants = [
{ url: '/lower', label: 'Lower Thirds' },
{ url: '/pip', label: 'PiP' },
{ url: '/studio', label: 'Studio Clock' },
{ url: '/countdown', label: 'Countdown' },
];
export default navigatorConstants;