import padStart from 'lodash/padStart' ; import { format } from 'date-fns' ; export function formatSeconds ( value ) { const hours = padStart ( `${ Math . floor ( value / 3600 ) }` , 2 , '0' ) ; const minutes = padStart ( `${ Math . floor ( value / 60 ) % 60 }` , 2 , '0' ) ; const seconds = padStart ( `${ value % 60 }` , 2 , '0' ) ; return `${ hours }:${ minutes }:${ seconds }` ; } export function formatTime ( time ) { return time != null ? format ( time , 'pp' ) : '' ; }