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/UseMessage.tsx | 60 +++++++++++++++++++++------------------
 1 file changed, 33 insertions(+), 27 deletions(-)

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

diff --git a/frontend/src/hooks/UseMessage.tsx b/frontend/src/hooks/UseMessage.tsx
index 97ec746..e0afa59 100644
--- a/frontend/src/hooks/UseMessage.tsx
+++ b/frontend/src/hooks/UseMessage.tsx
@@ -1,37 +1,43 @@
 import React, { useState } from 'react';
-import MessageDialog from "@components/MessageDialog";
+import MessageDialog from '@components/MessageDialog';
 
 const useMessage = () => {
-    const [isOpen, setIsOpen] = useState(false);
+  const [isOpen, setIsOpen] = useState(false);
 
-    const [title, setTitle] = useState<string>("");
-    const [subtitle, setSubtitle] = useState<string>("");
-    const [resolvePromise, setResolvePromise] = useState<(() => void) | null>(null);
+  const [title, setTitle] = useState<string>('');
+  const [subtitle, setSubtitle] = useState<string>('');
+  const [resolvePromise, setResolvePromise] = useState<(() => void) | null>(
+    null
+  );
 
-    const message = (title: string, subtitle: string) => {
-        setIsOpen(true);
-        setTitle(title);
-        setSubtitle(subtitle);
-		return new Promise((resolve) => {
-			setResolvePromise(() => resolve);
-		});
-    };
+  const message = (title: string, subtitle: string) => {
+    setIsOpen(true);
+    setTitle(title);
+    setSubtitle(subtitle);
+    return new Promise(resolve => {
+      setResolvePromise(() => resolve);
+    });
+  };
 
-    const handleClose = () => {
-        setIsOpen(false);
-        if (resolvePromise) {
-            resolvePromise();
-            setResolvePromise(null);
-        }
-    };
+  const handleClose = () => {
+    setIsOpen(false);
+    if (resolvePromise) {
+      resolvePromise();
+      setResolvePromise(null);
+    }
+  };
 
-    const MessageDialogComponent = isOpen && (
-		<div className="dialog-container">
-        <MessageDialog title={title} subtitle={subtitle} onClose={handleClose}></MessageDialog>
-		</div>
-    );
+  const MessageDialogComponent = isOpen && (
+    <div className="dialog-container">
+      <MessageDialog
+        title={title}
+        subtitle={subtitle}
+        onClose={handleClose}
+      ></MessageDialog>
+    </div>
+  );
 
-    return { message, MessageDialogComponent };
-}
+  return { message, MessageDialogComponent };
+};
 
 export default useMessage;
-- 
cgit v1.2.3

