aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/components/Transactions/views.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/components/Transactions/views.tsx')
-rw-r--r--packages/demobank-ui/src/components/Transactions/views.tsx19
1 files changed, 5 insertions, 14 deletions
diff --git a/packages/demobank-ui/src/components/Transactions/views.tsx b/packages/demobank-ui/src/components/Transactions/views.tsx
index 1613cb06a..8a8a8f72e 100644
--- a/packages/demobank-ui/src/components/Transactions/views.tsx
+++ b/packages/demobank-ui/src/components/Transactions/views.tsx
@@ -17,23 +17,14 @@
import { useTranslationContext } from "@gnu-taler/web-util/browser";
import { format } from "date-fns";
import { Fragment, h, VNode } from "preact";
-import { doAutoFocus, RenderAmount } from "../../pages/PaytoWireTransferForm.js";
-import { State } from "./index.js";
import { useBankCoreApiContext } from "../../context/config.js";
+import { RenderAmount } from "../../pages/PaytoWireTransferForm.js";
+import { State } from "./index.js";
-export function LoadingUriView({ error }: State.LoadingUriError): VNode {
- const { i18n } = useTranslationContext();
-
- return (
- <div>
- <i18n.Translate>Could not load</i18n.Translate>
- </div>
- );
-}
export function ReadyView({ transactions, onNext, onPrev }: State.Ready): VNode {
const { i18n } = useTranslationContext();
- const {config} = useBankCoreApiContext();
+ const { config } = useBankCoreApiContext();
if (!transactions.length) return <div />
const txByDate = transactions.reduce((prev, cur) => {
const d = cur.when.t_ms === "never"
@@ -80,7 +71,7 @@ export function ReadyView({ transactions, onNext, onPrev }: State.Ready): VNode
<dd class="mt-1 truncate text-gray-700">
{item.negative ? i18n.str`sent` : i18n.str`received`} {item.amount ? (
<span data-negative={item.negative ? "true" : "false"} class="data-[negative=false]:text-green-600 data-[negative=true]:text-red-600">
- <RenderAmount value={item.amount} spec={config.currency_specification}/>
+ <RenderAmount value={item.amount} spec={config.currency_specification} />
</span>
) : (
<span style={{ color: "grey" }}>&lt;{i18n.str`invalid value`}&gt;</span>
@@ -101,7 +92,7 @@ export function ReadyView({ transactions, onNext, onPrev }: State.Ready): VNode
</td>
<td data-negative={item.negative ? "true" : "false"}
class="hidden sm:table-cell px-3 py-3.5 text-sm text-gray-500 ">
- {item.amount ? (<RenderAmount value={item.amount} negative={item.negative} withColor spec={config.currency_specification}/>
+ {item.amount ? (<RenderAmount value={item.amount} negative={item.negative} withColor spec={config.currency_specification} />
) : (
<span style={{ color: "grey" }}>&lt;{i18n.str`invalid value`}&gt;</span>
)}