import { isNull } from 'lodash' import { LinearAnimatedProgressBar } from './LinearAnimatedProgressBar' export const EventCountdownProgressBar = ({ eventLabel, startDate, endDate, timeRemaining, status, }: { eventLabel: string startDate: Date endDate: Date | null timeRemaining: string status: 'idle' | 'pending' | 'complete' }) => { const isIndefinite = isNull(endDate) if (status === 'pending') { return (
{eventLabel}
{isIndefinite ? null :
{timeRemaining} remaining
}
) } else { return null } }