diff -r a8300ef1876e -r 284e866f55c7 client/src/components/Clock.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/Clock.js Thu Jun 08 11:13:41 2017 +0200 @@ -0,0 +1,25 @@ +import React, { Component } from 'react'; +import { Label } from 'react-bootstrap'; +import moment from 'moment'; + +class Clock extends Component { + + state = { + time: moment().format('H:mm:ss'), + } + + componentDidMount() { + setInterval(() => { + const time = moment().format('H:mm:ss'); + this.setState({ time }); + }, 1000); + } + + render() { + return ( + + ); + } +} + +export default Clock