diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-14 15:20:32 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-14 15:21:24 -0300 |
commit | 08959f83bc9f6d5df93cb6c2d34b671bf419d05a (patch) | |
tree | 1a366b05453de18b598c9a587caea7ba6d1c93e7 /packages/taler-wallet-webextension/src/wallet/BackupPage.tsx | |
parent | 1d7c8f7083f2aa98295f1ad28399c8e19a9e7754 (diff) | |
download | wallet-core-08959f83bc9f6d5df93cb6c2d34b671bf419d05a.tar.xz |
take translator from transaltion context
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/BackupPage.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/BackupPage.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
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 <http://www.gnu.org/licenses/> */ -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 <Loading />; @@ -110,6 +112,7 @@ export function BackupView({ onAddProvider, onSyncAll, }: ViewProps): VNode { + const { i18n } = useTranslationContext(); return ( <Fragment> <section> @@ -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 ( <Fragment> <CenteredText> |