FireStats class
This commit is contained in:
parent
395ee855dd
commit
1d0ad9c41b
2 changed files with 32 additions and 13 deletions
29
imports/ui/pages/FiresMap/FireStats.js
Normal file
29
imports/ui/pages/FiresMap/FireStats.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* eslint-disable react/jsx-indent-props */
|
||||
/* eslint-disable import/no-absolute-path */
|
||||
/* eslint-disable import/no-absolute-path */
|
||||
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { translate, Trans } from 'react-i18next';
|
||||
import FromNow from '/imports/ui/components/FromNow/FromNow';
|
||||
|
||||
class FireStats extends Component {
|
||||
render() {
|
||||
return (
|
||||
<Fragment>
|
||||
{ this.props.lastCheck && this.props.lastFireDetected &&
|
||||
<Trans>Actualizado <FromNow when={this.props.lastCheck} />, último fuego detectado <FromNow when={this.props.lastFireDetected.when} />.</Trans>}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
FireStats.propTypes = {
|
||||
lastFireDetected: PropTypes.object,
|
||||
lastCheck: PropTypes.instanceOf(Date)
|
||||
};
|
||||
|
||||
FireStats.defaultProps = {
|
||||
};
|
||||
|
||||
export default translate([], { wait: true })(FireStats);
|
||||
Loading…
Add table
Add a link
Reference in a new issue