Gaëtan Renaudeau
7 years ago
3 changed files with 19 additions and 1 deletions
@ -0,0 +1,16 @@ |
|||||
|
// @flow
|
||||
|
|
||||
|
import React, { PureComponent } from 'react' |
||||
|
import moment from 'moment' |
||||
|
import { translate } from 'react-i18next' |
||||
|
import type { T } from 'types/common' |
||||
|
import Box from './base/Box' |
||||
|
|
||||
|
class SyncAgo extends PureComponent<{ t: T, date: Date }> { |
||||
|
render() { |
||||
|
const { t, date } = this.props |
||||
|
return <Box p={4}>{t('app:common.sync.ago', { time: moment(date).fromNow() })}</Box> |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
export default translate()(SyncAgo) |
Loading…
Reference in new issue