import React from 'react'; import { PendingTime } from '../pending_time'; import { Interval } from '../interval'; import { StepStatus } from './steps_common'; interface Props { estimatedTxTimeMs: number; stepStatus: StepStatus; txStarted: number | null; } export const StepPendingTime: React.FC = props => { const { estimatedTxTimeMs, stepStatus, txStarted } = props; if (stepStatus === StepStatus.Loading && txStarted) { const startTime = new Date(txStarted); return ( {now => } ); } return null; };