From 9b04d8bf3581d162cbd631892ca115df811c46f8 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 9 Jan 2023 08:38:48 -0300
Subject: fix #7152

---
 .../src/wallet/BackupPage.tsx                         | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

(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 6e987f965..48c9c9cb1 100644
--- a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx
@@ -29,8 +29,8 @@ import {
 } from "date-fns";
 import { Fragment, h, VNode } from "preact";
 import { useEffect, useState } from "preact/hooks";
+import { AlertView } from "../components/CurrentAlerts.js";
 import { Loading } from "../components/Loading.js";
-import { LoadingError } from "../components/LoadingError.js";
 import { QR } from "../components/QR.js";
 import {
   BoldLight,
@@ -42,6 +42,7 @@ import {
   SmallText,
   WarningBox,
 } from "../components/styled/index.js";
+import { alertFromError } from "../context/alert.js";
 import { useBackendContext } from "../context/backend.js";
 import { useTranslationContext } from "../context/translation.js";
 import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
@@ -117,9 +118,11 @@ export function BackupPage({ onAddProvider }: Props): VNode {
   }
   if (status.hasError) {
     return (
-      <LoadingError
-        title={<i18n.Translate>Could not load backup providers</i18n.Translate>}
-        error={status}
+      <AlertView
+        alert={alertFromError(
+          i18n.str`Could not load backup providers`,
+          status,
+        )}
       />
     );
   }
@@ -219,11 +222,9 @@ export function BackupView({
           </div>
           <div>
             <Button variant="contained" onClick={onSyncAll}>
-              {providers.length > 1 ? (
-                <i18n.Translate>Sync all backups</i18n.Translate>
-              ) : (
-                <i18n.Translate>Sync now</i18n.Translate>
-              )}
+              {providers.length > 1
+                ? i18n.str`Sync all backups`
+                : i18n.str`Sync now`}
             </Button>
             <Button variant="contained" color="success" onClick={onAddProvider}>
               <i18n.Translate>Add provider</i18n.Translate>
-- 
cgit v1.2.3

