Merge branch 'master' into recaptcha-fix

This commit is contained in:
Wyatt Johnson
2017-03-16 11:59:56 -06:00
committed by GitHub
@@ -31,16 +31,20 @@ class CountdownTimer extends React.Component {
}
componentWillMount () {
setInterval(() => { // the countdown timer
this.interval = setInterval(() => { // the countdown timer
let nextCount = this.state.secondsUntilRefresh - 1;
if (nextCount < 0) {
nextCount = refreshIntervalSeconds;
this.props.handleTimeout();
return this.props.handleTimeout();
}
this.setState({secondsUntilRefresh: nextCount});
}, 1000);
}
componentWillUnmount () {
window.clearInterval(this.interval);
}
formatTime = () => {
const minutes = Math.floor(this.state.secondsUntilRefresh / 60);
let seconds = (this.state.secondsUntilRefresh % 60).toString();