var React = require('react'); var LogEntry = React.createClass({ propTypes: { event: React.PropTypes.object.isRequired }, render: function() { var d = new Date(this.props.event.createdAt); var localEventData = JSON.parse(JSON.stringify(this.props.event.data)); delete localEventData.description; delete localEventData.name; return ( {d.getDate() + "." + d.getMonth() + "." + d.getFullYear()}
kl. {d.getHours() + "." + d.getMinutes()} {this.props.event.data.name}[{this.props.event.type}] {JSON.stringify(localEventData)} {this.props.event.createdBy} ); } }); module.exports = LogEntry;