2019-12-08 22:43:49 +01:00
|
|
|
/** @jsx React.DOM */
|
|
|
|
|
2022-10-08 20:37:38 +02:00
|
|
|
var Timestamp = createReactClass({
|
2019-12-08 22:43:49 +01:00
|
|
|
render: function() {
|
|
|
|
if (this.props.timestamp <= 0) {
|
|
|
|
return <div className="timestamp">N/A</div>;
|
|
|
|
}
|
|
|
|
|
|
|
|
var t = new Date(this.props.timestamp * 1000);
|
|
|
|
var formatted = t.format('Y/m/d @ g:i:s a');
|
|
|
|
return (
|
|
|
|
<div className="timestamp">{ formatted }</div>
|
|
|
|
);
|
|
|
|
},
|
|
|
|
});
|