From a62deeef5d0cbe5fa98be390eac0e03bcae0f0b5 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 10 Nov 2021 10:20:52 -0300
Subject: prettier

---
 .../src/pages/home/BackupFinishedScreen.tsx        | 85 ++++++++++++++--------
 1 file changed, 53 insertions(+), 32 deletions(-)

(limited to 'packages/anastasis-webui/src/pages/home/BackupFinishedScreen.tsx')

diff --git a/packages/anastasis-webui/src/pages/home/BackupFinishedScreen.tsx b/packages/anastasis-webui/src/pages/home/BackupFinishedScreen.tsx
index 7938baca4..825ec5dc0 100644
--- a/packages/anastasis-webui/src/pages/home/BackupFinishedScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/BackupFinishedScreen.tsx
@@ -4,41 +4,62 @@ import { useAnastasisContext } from "../../context/anastasis";
 import { AnastasisClientFrame } from "./index";
 
 export function BackupFinishedScreen(): VNode {
-  const reducer = useAnastasisContext()
+  const reducer = useAnastasisContext();
   if (!reducer) {
-    return <div>no reducer in context</div>
+    return <div>no reducer in context</div>;
   }
-  if (!reducer.currentReducerState || reducer.currentReducerState.backup_state === undefined) {
-    return <div>invalid state</div>
+  if (
+    !reducer.currentReducerState ||
+    reducer.currentReducerState.backup_state === undefined
+  ) {
+    return <div>invalid state</div>;
   }
-  const details = reducer.currentReducerState.success_details
+  const details = reducer.currentReducerState.success_details;
 
-  return (<AnastasisClientFrame hideNav title="Backup finished">
-    {reducer.currentReducerState.secret_name ? <p>
-      Your backup of secret <b>"{reducer.currentReducerState.secret_name}"</b> was
-      successful.
-    </p> :
-      <p>
-        Your secret was successfully backed up.
-      </p>}
+  return (
+    <AnastasisClientFrame hideNav title="Backup finished">
+      {reducer.currentReducerState.secret_name ? (
+        <p>
+          Your backup of secret{" "}
+          <b>"{reducer.currentReducerState.secret_name}"</b> was successful.
+        </p>
+      ) : (
+        <p>Your secret was successfully backed up.</p>
+      )}
 
-    {details && <div class="block">
-      <p>The backup is stored by the following providers:</p>
-      {Object.keys(details).map((x, i) => {
-        const sd = details[x];
-        return (
-          <div key={i} class="box">
-            {x}
-            <p>
-              version {sd.policy_version}
-              {sd.policy_expiration.t_ms !== 'never' ? ` expires at: ${format(sd.policy_expiration.t_ms, 'dd-MM-yyyy')}` : ' without expiration date'}
-            </p>
-          </div>
-        );
-      })}
-    </div>}
-    <div style={{ marginTop: '2em', display: 'flex', justifyContent: 'space-between' }}>
-      <button class="button" onClick={() => reducer.back()}>Back</button>
-    </div>
-  </AnastasisClientFrame>);
+      {details && (
+        <div class="block">
+          <p>The backup is stored by the following providers:</p>
+          {Object.keys(details).map((x, i) => {
+            const sd = details[x];
+            return (
+              <div key={i} class="box">
+                {x}
+                <p>
+                  version {sd.policy_version}
+                  {sd.policy_expiration.t_ms !== "never"
+                    ? ` expires at: ${format(
+                        sd.policy_expiration.t_ms,
+                        "dd-MM-yyyy",
+                      )}`
+                    : " without expiration date"}
+                </p>
+              </div>
+            );
+          })}
+        </div>
+      )}
+      <div
+        style={{
+          marginTop: "2em",
+          display: "flex",
+          justifyContent: "space-between",
+        }}
+      >
+        <button class="button" onClick={() => reducer.back()}>
+          Back
+        </button>
+      </div>
+    </AnastasisClientFrame>
+  );
 }
-- 
cgit v1.2.3

