/* eslint-disable react/no-danger */ import React from 'react'; import PropTypes from 'prop-types'; import { Alert, Collapse } from 'react-bootstrap'; const propTypes = { message: PropTypes.string, queryResponse: PropTypes.object, showStackTrace: PropTypes.bool, }; const defaultProps = { showStackTrace: false, }; class StackTraceMessage extends React.PureComponent { constructor(props) { super(props); this.state = { showStackTrace: props.showStackTrace, }; } hasTrace() { return this.props.queryResponse && this.props.queryResponse.stacktrace; } render() { const msg = (
{this.props.queryResponse.stacktrace}