import React from 'react';
import cn from 'classnames';
import { OPENREPLAY, SENTRY, DATADOG, STACKDRIVER } from 'Types/session/stackEvent';
import { Icon, SlideModal, IconButton } from 'UI';
import withToggle from 'HOCs/withToggle';
import Sentry from './Sentry';
import JsonViewer from './JsonViewer';
import stl from './userEvent.module.css';
// const modalSources = [ SENTRY, DATADOG ];
@withToggle() //
export default class UserEvent extends React.PureComponent {
getIconProps() {
const { source } = this.props.userEvent;
return {
name: `integrations/${ source }`,
size: 18,
marginRight: source === OPENREPLAY ? 11 : 10
}
}
getLevelClassname() {
const { userEvent } = this.props;
if (userEvent.isRed()) return "error color-red";
return '';
}
// getEventMessage() {
// const { userEvent } = this.props;
// switch(userEvent.source) {
// case SENTRY:
// case DATADOG:
// return null;
// default:
// return JSON.stringify(userEvent.data);
// }
// }
renderPopupContent() {
const { userEvent: { source, payload, name} } = this.props;
switch(source) {
case SENTRY:
return