1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
unleash.unleash/frontend/src/component/history/history-item-json.jsx
Simen Bekkhus b176d63f56 Fix deprecations (#88)
* Fix some optimization bailouts

* Use prop-types package

* Make error comp functional

* Remove unused css transition dep

* Remove unused immutability helper dep

* Align react versions in package.json
2017-08-28 21:30:12 +02:00

30 lines
770 B
JavaScript

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import style from './history.scss';
class HistoryItem extends PureComponent {
static propTypes = {
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;