From 08959f83bc9f6d5df93cb6c2d34b671bf419d05a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 14 Mar 2022 15:20:32 -0300 Subject: take translator from transaltion context --- packages/taler-wallet-webextension/src/wallet/BackupPage.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-webextension/src/wallet/BackupPage.tsx') diff --git a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx index a5821d48b..39afe8441 100644 --- a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, see */ -import { i18n, Timestamp, Translate } from "@gnu-taler/taler-util"; +import { Timestamp, Translate } from "@gnu-taler/taler-util"; import { ProviderInfo, ProviderPaymentPaid, @@ -40,6 +40,7 @@ import { SmallLightText, SmallText, } from "../components/styled"; +import { useTranslationContext } from "../context/translation"; import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; import { Pages } from "../NavigationBar"; import * as wxApi from "../wxApi"; @@ -65,6 +66,7 @@ interface Props { // } export function BackupPage({ onAddProvider }: Props): VNode { + const { i18n } = useTranslationContext(); const status = useAsyncAsHook(wxApi.getBackupInfo); if (!status) { return ; @@ -110,6 +112,7 @@ export function BackupView({ onAddProvider, onSyncAll, }: ViewProps): VNode { + const { i18n } = useTranslationContext(); return (
@@ -164,6 +167,7 @@ interface TransactionLayoutProps { } function BackupLayout(props: TransactionLayoutProps): VNode { + const { i18n } = useTranslationContext(); const date = !props.timestamp ? undefined : new Date(props.timestamp.t_ms); const dateStr = date?.toLocaleString([], { dateStyle: "medium", @@ -205,6 +209,7 @@ function BackupLayout(props: TransactionLayoutProps): VNode { } function ExpirationText({ until }: { until: Timestamp }): VNode { + const { i18n } = useTranslationContext(); return ( -- cgit v1.2.3