From a35604fd562a72e4e266bf6a4255d89d3c1374a1 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 19 Nov 2021 14:51:27 -0300
Subject: some changes:

 - simplify design to reuse more components (from wallet instead of popup)
 - simplify hooks (useAsyncAsHook)
 - updateNotification from backend now filter events by type
 - new balance design proposed by Belen
 - more information when the withdrawal is in process
 - manual withdrawal implementation
 - some bugs killed
---
 .../taler-wallet-webextension/src/wallet/BackupPage.tsx     | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 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 f0ae38e0f..0b0af25ab 100644
--- a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx
@@ -35,7 +35,6 @@ import {
   RowBorderGray,
   SmallLightText,
   SmallText,
-  WalletBox,
 } from "../components/styled";
 import { useBackupStatus } from "../hooks/useBackupStatus";
 import { Pages } from "../NavigationBar";
@@ -70,7 +69,7 @@ export function BackupView({
   onSyncAll,
 }: ViewProps): VNode {
   return (
-    <WalletBox>
+    <Fragment>
       <section>
         {providers.map((provider, idx) => (
           <BackupLayout
@@ -106,7 +105,7 @@ export function BackupView({
           </div>
         </footer>
       )}
-    </WalletBox>
+    </Fragment>
   );
 }
 
@@ -155,7 +154,7 @@ function BackupLayout(props: TransactionLayoutProps): VNode {
   );
 }
 
-function ExpirationText({ until }: { until: Timestamp }) {
+function ExpirationText({ until }: { until: Timestamp }): VNode {
   return (
     <Fragment>
       <CenteredText> Expires in </CenteredText>
@@ -167,14 +166,14 @@ function ExpirationText({ until }: { until: Timestamp }) {
   );
 }
 
-function colorByTimeToExpire(d: Timestamp) {
+function colorByTimeToExpire(d: Timestamp): string {
   if (d.t_ms === "never") return "rgb(28, 184, 65)";
   const months = differenceInMonths(d.t_ms, new Date());
   return months > 1 ? "rgb(28, 184, 65)" : "rgb(223, 117, 20)";
 }
 
-function daysUntil(d: Timestamp) {
-  if (d.t_ms === "never") return undefined;
+function daysUntil(d: Timestamp): string {
+  if (d.t_ms === "never") return "";
   const duration = intervalToDuration({
     start: d.t_ms,
     end: new Date(),
-- 
cgit v1.2.3

