From e40f07211f5f15dcb138e2520a76d13afd3c0cfd Mon Sep 17 00:00:00 2001
From: FifthWit <fifthwitbusiness@gmail.com>
Date: Thu, 30 Jan 2025 10:44:30 -0600
Subject: formatted with prettier

---
 frontend/src/hooks/UseMessageLoad.tsx | 55 +++++++++++++++++++----------------
 1 file changed, 30 insertions(+), 25 deletions(-)

(limited to 'frontend/src/hooks/UseMessageLoad.tsx')

diff --git a/frontend/src/hooks/UseMessageLoad.tsx b/frontend/src/hooks/UseMessageLoad.tsx
index 228c2b4..ea0b5d8 100644
--- a/frontend/src/hooks/UseMessageLoad.tsx
+++ b/frontend/src/hooks/UseMessageLoad.tsx
@@ -1,35 +1,40 @@
 import React, { useState } from 'react';
-import MessageDialogLoad from "@components/MessageDialogLoad";
+import MessageDialogLoad from '@components/MessageDialogLoad';
 
 const useMessageLoad = () => {
-    const [isOpen, setIsOpen] = useState(false);
+  const [isOpen, setIsOpen] = useState(false);
 
-    const [title, setTitle] = useState<string>("");
-    const [resolvePromise, setResolvePromise] = useState<(() => void) | null>(null);
+  const [title, setTitle] = useState<string>('');
+  const [resolvePromise, setResolvePromise] = useState<(() => void) | null>(
+    null
+  );
 
-	const messageLoad = (title: string) => {
-        setIsOpen(true);
-        setTitle(title);
-		return new Promise((resolve) => {
-			setResolvePromise(() => resolve);
-		});
-    };
+  const messageLoad = (title: string) => {
+    setIsOpen(true);
+    setTitle(title);
+    return new Promise(resolve => {
+      setResolvePromise(() => resolve);
+    });
+  };
 
-    const messageLoadClose = () => {
-        setIsOpen(false);
-        if (resolvePromise) {
-            resolvePromise();
-            setResolvePromise(null);
-        }
-    };
+  const messageLoadClose = () => {
+    setIsOpen(false);
+    if (resolvePromise) {
+      resolvePromise();
+      setResolvePromise(null);
+    }
+  };
 
-    const MessageDialogLoadComponent = isOpen && (
-		<div className="dialog-container">
-        <MessageDialogLoad title={title} onClose={messageLoadClose}></MessageDialogLoad>
-		</div>
-    );
+  const MessageDialogLoadComponent = isOpen && (
+    <div className="dialog-container">
+      <MessageDialogLoad
+        title={title}
+        onClose={messageLoadClose}
+      ></MessageDialogLoad>
+    </div>
+  );
 
-    return { messageLoad, messageLoadClose, MessageDialogLoadComponent };
-}
+  return { messageLoad, messageLoadClose, MessageDialogLoadComponent };
+};
 
 export default useMessageLoad;
-- 
cgit v1.2.3

