UNPKG

@revoloo/cypress6

Version:

Cypress.io end to end testing tool

30 lines (24 loc) 612 B
import React, { Component } from 'react' import { observer } from 'mobx-react' import TimerStore from './duration-timer-store' @observer export default class TimerDisplay extends Component { constructor (...props) { super(...props) this.timerStore = new TimerStore(this.props.startTime) } componentDidMount () { this.timerStore.startTimer() } componentWillUnmount () { this.timerStore.resetTimer() } render () { return ( <span className='env-duration'> <i className='fas fa-hourglass-half'></i> {this.timerStore.mainDisplay} </span> ) } }