import React, { createRef } from 'react'; /** * Takes errorData object with title, message, and more_info keys as props. The * component displays a bootstrap modal when mounted. errorData.title is used * to set modal title. errorData.message is inserted as HTML text in modal * body. And errorData.more_info is shown using a pre tag in modal body. * * The displayed modal dialog cannot be dismissed. * The user must close the tab or press back button to go back to search form. */ export default class ErrorModal extends React.Component { constructor(props) { super(props); this.state = { errorData: {} }; this.modal = createRef(); } // HTML for Bootstrap modal. render() { return (
{this.state.errorData.more_info}}