happypack
Version:
webpack speed booster, makes you happy!
21 lines (18 loc) • 481 B
JavaScript
import React, {Component, PropTypes} from 'react';
import {connect} from 'react-redux';
(state => ({ time: state.info.data.time }))
export default class MiniInfoBar extends Component {
static propTypes = {
time: PropTypes.number
}
render() {
const {time} = this.props;
return (
<div className="mini-info-bar">
The info bar was last loaded at
{' '}
<span>{time && new Date(time).toString()}</span>
</div>
);
}
}