aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/BackupPage.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/BackupPage.tsx7
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>