Also hide bug reporting prompts from the Error Boundaries
This commit is contained in:
parent
16d8ea184d
commit
caef9b27a0
2 changed files with 22 additions and 6 deletions
|
@ -19,6 +19,7 @@ import classNames from 'classnames';
|
|||
import { _t } from '../../../languageHandler';
|
||||
import * as sdk from '../../../index';
|
||||
import Modal from '../../../Modal';
|
||||
import SdkConfig from "../../../SdkConfig";
|
||||
|
||||
export default class TileErrorBoundary extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -54,14 +55,20 @@ export default class TileErrorBoundary extends React.Component {
|
|||
mx_EventTile_content: true,
|
||||
mx_EventTile_tileError: true,
|
||||
};
|
||||
|
||||
let submitLogsButton;
|
||||
if (SdkConfig.get().bug_report_endpoint_url) {
|
||||
submitLogsButton = <a onClick={this._onBugReport} href="#">
|
||||
{_t("Submit logs")}
|
||||
</a>;
|
||||
}
|
||||
|
||||
return (<div className={classNames(classes)}>
|
||||
<div className="mx_EventTile_line">
|
||||
<span>
|
||||
{_t("Can't load this message")}
|
||||
{ mxEvent && ` (${mxEvent.getType()})` }
|
||||
<a onClick={this._onBugReport} href="#">
|
||||
{_t("Submit logs")}
|
||||
</a>
|
||||
{ submitLogsButton }
|
||||
</span>
|
||||
</div>
|
||||
</div>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue