From b4bad2deaf93eff5858d903cd68b8fdd5a5eecd3 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 26 Oct 2022 14:50:50 -0300
Subject: pretty

---
 packages/demobank-ui/src/components/FileButton.tsx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'packages/demobank-ui/src/components/FileButton.tsx')

diff --git a/packages/demobank-ui/src/components/FileButton.tsx b/packages/demobank-ui/src/components/FileButton.tsx
index dba86ccbf..7fad7f03a 100644
--- a/packages/demobank-ui/src/components/FileButton.tsx
+++ b/packages/demobank-ui/src/components/FileButton.tsx
@@ -1,5 +1,5 @@
-import { h, VNode } from 'preact';
-import { useRef, useState } from 'preact/hooks';
+import { h, VNode } from "preact";
+import { useRef, useState } from "preact/hooks";
 
 const MAX_IMAGE_UPLOAD_SIZE = 1024 * 1024;
 
@@ -23,13 +23,12 @@ export function FileButton(props: Props): VNode {
       </button>
       <input
         ref={fileInputRef}
-        style={{ display: 'none' }}
+        style={{ display: "none" }}
         type="file"
         onChange={(e) => {
           const f: FileList | null = e.currentTarget.files;
-          if (!f || f.length != 1) 
-            return props.onChange(undefined);
-          
+          if (!f || f.length != 1) return props.onChange(undefined);
+
           console.log(f);
           if (f[0].size > MAX_IMAGE_UPLOAD_SIZE) {
             setSizeError(true);
@@ -39,7 +38,7 @@ export function FileButton(props: Props): VNode {
           return f[0].arrayBuffer().then((b) => {
             const content = new Uint8Array(b).reduce(
               (data, byte) => data + String.fromCharCode(byte),
-              '',
+              "",
             );
             return props.onChange({
               content,
-- 
cgit v1.2.3

