From 1d4815c66c395f4fcc86c30e20f3d005e3cb9ff5 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 15 Nov 2021 11:18:58 -0300
Subject: prettier

---
 .../src/components/ErrorMessage.tsx                | 41 ++++++++++++++--------
 1 file changed, 27 insertions(+), 14 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/components/ErrorMessage.tsx')

diff --git a/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx b/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx
index cfcef16d5..c6b64fb6a 100644
--- a/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx
+++ b/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx
@@ -13,22 +13,35 @@
  You should have received a copy of the GNU General Public License along with
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
- import { VNode, h } from "preact";
+import { VNode, h } from "preact";
 import { useState } from "preact/hooks";
-import arrowDown from '../../static/img/chevron-down.svg';
+import arrowDown from "../../static/img/chevron-down.svg";
 import { ErrorBox } from "./styled";
 
-export function ErrorMessage({ title, description }: { title?: string|VNode; description?: string; }) {
+export function ErrorMessage({
+  title,
+  description,
+}: {
+  title?: string | VNode;
+  description?: string;
+}) {
   const [showErrorDetail, setShowErrorDetail] = useState(false);
-  if (!title)
-    return null;
-  return <ErrorBox style={{paddingTop: 0, paddingBottom: 0}}>
-    <div>
-      <p>{title}</p>
-      { description && <button onClick={() => { setShowErrorDetail(v => !v); }}>
-        <img style={{ height: '1.5em' }} src={arrowDown} />
-      </button> }
-    </div>
-    {showErrorDetail && <p>{description}</p>}
-  </ErrorBox>;
+  if (!title) return null;
+  return (
+    <ErrorBox style={{ paddingTop: 0, paddingBottom: 0 }}>
+      <div>
+        <p>{title}</p>
+        {description && (
+          <button
+            onClick={() => {
+              setShowErrorDetail((v) => !v);
+            }}
+          >
+            <img style={{ height: "1.5em" }} src={arrowDown} />
+          </button>
+        )}
+      </div>
+      {showErrorDetail && <p>{description}</p>}
+    </ErrorBox>
+  );
 }
-- 
cgit v1.2.3

