content: import React, { Component } from 'react';
  
  class Countdown extends Component {
  	constructor(props) {
  		super(props);
  		this.state = {
  			deadline: 'August 5, 2017',
  			days: 0,
  			hours: 0,
  			minutes: 0,
  			seconds: 0
  		}
  	}
  
  	componentWillMount() {
  		this.getTimeUntil(this.state.deadline);
  	}
  
  	componentDidMount() {
  		setInterval(() => this.getTimeUntil(this.state.deadline), 1000);
  	}
  
  	getTimeUntil(deadline) {
  		const time = Date.parse(deadline) - Date.parse(new Date());
  		const seconds = Math.floor((time/1000) % 60);
  		const minutes = Math.floor((time/1000/60) % 60);
  		const hours = Math.floor(time/(1000*60*60) % 24);
  		const days = Math.floor(time/(1000*60*60*24));
  
  		this.setState({days, hours, minutes, seconds});
  	}
  
  	render() {
  		return (
  			<div className="row countdown">
  				<div className="col-xs-3 countdown-number-container" id="days">
  					<div className="countdown-number">{this.state.days}</div>
  					<div>days</div>
  				</div>
  				<div className="col-xs-3 countdown-number-container" id="hours">
  					<div className="countdown-number">{this.state.hours}</div>
  					<div>hours</div>
  				</div>
  				<div className="col-xs-3 countdown-number-container" id="minutes">
  					<div className="countdown-number">{this.state.minutes}</div>
  					<div>minutes</div>
  				</div>
  				<div className="col-xs-3 countdown-number-container" id="seconds">
  					<div className="countdown-number">{this.state.seconds}</div>
  					<div>seconds</div>
  				</div>
  			</div>
  		);
  	}
  }
  
  export default Countdown;