import React from 'react' import { connect } from 'react-redux' import { t, c, jt } from 'ttag' import ModalCard from '../components/ModalCard' import { clearError } from '../actions/error' type ErrorModalProps = { show: boolean title: string message: string debugInfo?: string | null onHide: () => any } const ErrorModal = ({ show, title, message, debugInfo, onHide }: ErrorModalProps) => { if (!show) { return null } let debug = null if (debugInfo !== null) { const reportAnIssue = ( {c("This is the value of 'reportAnIssue'").t`report an issue`} ) debug = (
{jt`If the problem persists, please ${reportAnIssue} and include the following information:`}
{debugInfo}
{message}
{debug}