Don't show option to submit bug reports if no endpoint configured

This commit is contained in:
David Baker
2022-12-22 14:12:49 +00:00
parent 891ff86b49
commit de0f2e65a5
2 changed files with 12 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ import { useSubmitRageshake } from "./settings/submit-rageshake";
import { ErrorMessage } from "./input/Input";
import styles from "./FullScreenView.module.css";
import { translatedError, TranslatedError } from "./TranslatedError";
import { Config } from "./config/Config";
interface FullScreenViewProps {
className?: string;
@@ -98,7 +99,7 @@ export function CrashView() {
logsComponent = <div>{t("Thanks! We'll get right on it.")}</div>;
} else if (sending) {
logsComponent = <div>{t("Sending…")}</div>;
} else {
} else if (Config.get().rageshake?.submit_url) {
logsComponent = (
<Button
size="lg"
@@ -115,7 +116,9 @@ export function CrashView() {
<FullScreenView>
<Trans>
<h1>Oops, something's gone wrong.</h1>
<p>Submitting debug logs will help us track down the problem.</p>
{Config.get().rageshake?.submit_url && (
<p>Submitting debug logs will help us track down the problem.</p>
)}
</Trans>
<div className={styles.sendLogsSection}>{logsComponent}</div>
{error && (