From 08959f83bc9f6d5df93cb6c2d34b671bf419d05a Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 14 Mar 2022 15:20:32 -0300
Subject: take translator from transaltion context

---
 .../src/components/TransactionItem.tsx                        | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/components/TransactionItem.tsx')

diff --git a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
index b17dfce88..42afe5eaf 100644
--- a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
+++ b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
@@ -21,23 +21,18 @@ import {
   Timestamp,
   Transaction,
   TransactionType,
-  i18n,
 } from "@gnu-taler/taler-util";
 import { h, VNode } from "preact";
-import imageBank from "../../static/img/ri-bank-line.svg";
-import imageHandHeart from "../../static/img/ri-hand-heart-line.svg";
-import imageRefresh from "../../static/img/ri-refresh-line.svg";
-import imageRefund from "../../static/img/ri-refund-2-line.svg";
-import imageShoppingCart from "../../static/img/ri-shopping-cart-line.svg";
+import { useTranslationContext } from "../context/translation";
 import { Avatar } from "../mui/Avatar";
 import { Pages } from "../NavigationBar";
 import {
   Column,
   ExtraLargeText,
   HistoryRow,
-  SmallLightText,
   LargeText,
   LightText,
+  SmallLightText,
 } from "./styled";
 import { Time } from "./Time";
 
@@ -121,6 +116,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
 }
 
 function TransactionLayout(props: TransactionLayoutProps): VNode {
+  const { i18n } = useTranslationContext();
   return (
     <HistoryRow
       href={Pages.balance_transaction.replace(":tid", props.id)}
@@ -183,6 +179,7 @@ interface TransactionAmountProps {
 }
 
 function TransactionAmount(props: TransactionAmountProps): VNode {
+  const { i18n } = useTranslationContext();
   let sign: string;
   switch (props.debitCreditIndicator) {
     case "credit":
-- 
cgit v1.2.3

