mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
* 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
30 lines
770 B
JavaScript
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;
|