mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
32 lines
779 B
JavaScript
32 lines
779 B
JavaScript
import React, { PropTypes, PureComponent } from 'react';
|
|
|
|
import style from './history.scss';
|
|
|
|
class HistoryItem extends PureComponent {
|
|
|
|
static propTypes () {
|
|
return {
|
|
entry: PropTypes.object,
|
|
};
|
|
}
|
|
|
|
render () {
|
|
const localEventData = JSON.parse(JSON.stringify(this.props.entry));
|
|
delete localEventData.description;
|
|
delete localEventData.name;
|
|
delete localEventData.diffs;
|
|
|
|
const prettyPrinted = JSON.stringify(localEventData, null, 2);
|
|
|
|
return (
|
|
<div className={style['history-item']}>
|
|
<div>
|
|
<code className="JSON smalltext man">{prettyPrinted}</code>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default HistoryItem;
|