diff options
author | Sebastian <sebasjm@gmail.com> | 2023-04-19 12:42:47 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-04-19 12:42:47 -0300 |
commit | d483a3f5574355ed9c43eb6ddea59e5734323cf0 (patch) | |
tree | 2f4e3830512b50808b396991791c3c8877e5676e /packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx | |
parent | 7330f0daf907133876baf8831c44ec34cec326e5 (diff) | |
download | wallet-core-d483a3f5574355ed9c43eb6ddea59e5734323cf0.tar.xz |
fix #7704
Diffstat (limited to 'packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx b/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx index f8203f38a..2979c28e5 100644 --- a/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx +++ b/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx @@ -17,8 +17,8 @@ import { TalerErrorDetail, TranslatedString } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import arrowDown from "../svg/chevron-down.svg"; -import { useDevContext } from "../context/devContext.js"; import { ErrorBox } from "./styled/index.js"; +import { EnabledBySettings } from "./EnabledBySettings.js"; export function ErrorTalerOperation({ title, @@ -27,7 +27,6 @@ export function ErrorTalerOperation({ title?: TranslatedString; error?: TalerErrorDetail; }): VNode | null { - const { devMode } = useDevContext(); const [showErrorDetail, setShowErrorDetail] = useState(false); if (!title || !error) return null; @@ -62,11 +61,11 @@ export function ErrorTalerOperation({ <b>{error.hint}</b> {!errorHint ? "" : `: ${errorHint}`}{" "} </div> </div> - {devMode && ( + <EnabledBySettings name="showJsonOnError"> <div style={{ textAlign: "left", overflowX: "auto" }}> <pre>{JSON.stringify(error, undefined, 2)}</pre> </div> - )} + </EnabledBySettings> </Fragment> )} </ErrorBox> |