aboutsummaryrefslogtreecommitdiff
path: root/packages/web-util/src/components
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-01-11 16:41:24 -0300
committerSebastian <sebasjm@gmail.com>2024-01-11 16:41:42 -0300
commit82d4ed90caa4a6ea3bdda1fb80ccecf3dc3637f9 (patch)
tree59162f0565311e8699ca643a8bd60337ee7f582b /packages/web-util/src/components
parentca67640f9f94f1150c0fb67c148dc79daa9d3fa0 (diff)
downloadwallet-core-82d4ed90caa4a6ea3bdda1fb80ccecf3dc3637f9.tar.xz
2fa
Diffstat (limited to 'packages/web-util/src/components')
-rw-r--r--packages/web-util/src/components/LocalNotificationBanner.tsx18
1 files changed, 4 insertions, 14 deletions
diff --git a/packages/web-util/src/components/LocalNotificationBanner.tsx b/packages/web-util/src/components/LocalNotificationBanner.tsx
index ab46703cb..62733ab3c 100644
--- a/packages/web-util/src/components/LocalNotificationBanner.tsx
+++ b/packages/web-util/src/components/LocalNotificationBanner.tsx
@@ -1,9 +1,8 @@
import { h, Fragment, VNode } from "preact";
import { Attention } from "./Attention.js";
import { Notification } from "../index.browser.js";
-// import { useSettings } from "../hooks/settings.js";
-export function LocalNotificationBanner({ notification }: { notification?: Notification }): VNode {
+export function LocalNotificationBanner({ notification, showDebug }: { notification?: Notification, showDebug?: boolean }): VNode {
if (!notification) return <Fragment />
switch (notification.message.type) {
case "error":
@@ -17,7 +16,9 @@ export function LocalNotificationBanner({ notification }: { notification?: Notif
{notification.message.description}
</div>
}
- {/* <MaybeShowDebugInfo info={notification.message.debug} /> */}
+ {showDebug && <pre class="whitespace-break-spaces ">
+ {notification.message.debug}
+ </pre>}
</Attention>
</div>
</div>
@@ -30,14 +31,3 @@ export function LocalNotificationBanner({ notification }: { notification?: Notif
}
}
-
-// function MaybeShowDebugInfo({ info }: { info: any }): VNode {
-// const [settings] = useSettings()
-// if (settings.showDebugInfo) {
-// return <pre class="whitespace-break-spaces ">
-// {info}
-// </pre>
-// }
-// return <Fragment />
-// }
-