1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
Matthias Hannig 082b462188 fixed value error
2018-09-25 22:32:01 +02:00

24 lines
315 B
JavaScript

import moment from 'moment'
import React from 'react'
export default class RelativeTime extends React.Component {
render() {
if (!this.props.value) {
return null;
}
let time = moment.utc(this.props.value);
return (
<span>{time.fromNow(this.props.suffix)}</span>
);
}
}