openreplay/frontend/app/components/Dashboard/Widgets/MostImpactfulErrors/ErrorInfo.js
Shekar Siri 2ed5cac986
Webpack upgrade and dependency cleanup (#523)
* change(ui) - webpack update
* change(ui) - api optimize and other fixes
2022-06-03 16:47:38 +02:00

31 lines
918 B
JavaScript

import React from 'react';
import { diffFromNowString } from 'App/date';
import { TextEllipsis } from 'UI';
import styles from './errorInfo.module.css';
export default class ErrorInfo extends React.PureComponent {
findJourneys = () => this.props.findJourneys(this.props.data.error)
render() {
const { data } = this.props;
return (
<div className="flex flex-col" >
<TextEllipsis
onClick={ this.findJourneys }
className={ styles.errorText }
text={ data.error }
popupProps={{
position: 'left center',
wide: 'very',
offset: '100',
positionFixed: true,
size: 'small'
}}
/>
<div className={ styles.timings }>
{ `${ diffFromNowString(data.lastOccurrenceAt) } ago - ${ diffFromNowString(data.firstOccurrenceAt) } old` }
</div>
</div>
);
}
}