diff options
author | Sebastian <sebasjm@gmail.com> | 2022-12-07 16:07:42 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-12-07 16:08:20 -0300 |
commit | 46835d5155a561ddf9f3e21bbb81c823c3eab943 (patch) | |
tree | 51011d2bae21b66695e3854ed49b9c63f5f35255 /packages/demobank-ui/src/pages/home/Transactions.tsx | |
parent | 1c6369677ab272196da314d95825273c6fff8d5f (diff) | |
download | wallet-core-46835d5155a561ddf9f3e21bbb81c823c3eab943.tar.xz |
no-fix: user logger instead of console.log
Diffstat (limited to 'packages/demobank-ui/src/pages/home/Transactions.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/home/Transactions.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/demobank-ui/src/pages/home/Transactions.tsx b/packages/demobank-ui/src/pages/home/Transactions.tsx index c0bb86024..295bfe0e6 100644 --- a/packages/demobank-ui/src/pages/home/Transactions.tsx +++ b/packages/demobank-ui/src/pages/home/Transactions.tsx @@ -1,8 +1,10 @@ +import { Logger } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useEffect } from "preact/hooks"; import useSWR from "swr"; import { useTranslationContext } from "../../context/translation.js"; +const logger = new Logger("Transactions"); /** * Show one page of transactions. */ @@ -25,7 +27,7 @@ export function Transactions({ } }, [balanceValue ?? ""]); if (typeof error !== "undefined") { - console.log("transactions not found error", error); + logger.error("transactions not found error", error); switch (error.status) { case 404: { return <p>Transactions page {pageNumber} was not found.</p>; @@ -39,10 +41,10 @@ export function Transactions({ } } if (!data) { - console.log(`History data of ${accountLabel} not arrived`); + logger.trace(`History data of ${accountLabel} not arrived`); return <p>Transactions page loading...</p>; } - console.log(`History data of ${accountLabel}`, data); + logger.trace(`History data of ${accountLabel}`, data); return ( <div class="results"> <table class="pure-table pure-table-striped"> |