Fakultas Ilmu Komputer UI

Commit caac929d authored by I Gusti Agung Nanda Dharma Wangsa's avatar I Gusti Agung Nanda Dharma Wangsa
Browse files

Implement display time at footer page

parent 20d36906
Pipeline #23133 failed with stages
in 7 minutes and 45 seconds
......@@ -2,13 +2,24 @@ import React from 'react';
import { Container } from 'semantic-ui-react';
export default class Footer extends React.Component {
state() {
currentTime: null
}
render() {
return (
<div className="footer">
<Container textAlign="center">
<h5>All Rights Reserved © 2017</h5>
<h5>Date/Time: {this.state.currentTime}<span id="datetime"></span></h5>
</Container>
</div>
);
}
componentDidMount() {
setInterval( () => {
this.setState({
currentTime : new Date().toLocaleString()
})
},1000)
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment