A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/time-remaining/time-remaining.component.js

34 lines
811 B

import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { getTimeBreakdown } from './time-remaining.utils'
export default class TimeRemaining extends Component {
static contextTypes = {
t: PropTypes.func,
}
static propTypes = {
milliseconds: PropTypes.number,
}
render () {
const {
milliseconds,
} = this.props
const {
minutes,
seconds,
} = getTimeBreakdown(milliseconds)
return (
<div className="time-remaining">
<span className="minutes-num">{minutes}</span>
<span className="minutes-label">{this.context.t('minutesShorthand')}</span>
<span className="seconds-num">{seconds}</span>
<span className="seconds-label">{this.context.t('secondsShorthand')}</span>
</div>
)
}
}