From b229a524fae8908928f16832e8e4d4c604cefa3e Mon Sep 17 00:00:00 2001
From: Wolfboy248 <georgejvindkarlsen@gmail.com>
Date: Mon, 28 Oct 2024 11:35:04 +0100
Subject: refactor: uploadrundialog

---
 frontend/src/hooks/UseMessage.tsx | 4 ++++
 1 file changed, 4 insertions(+)

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

diff --git a/frontend/src/hooks/UseMessage.tsx b/frontend/src/hooks/UseMessage.tsx
index 249a3bf..ebc4276 100644
--- a/frontend/src/hooks/UseMessage.tsx
+++ b/frontend/src/hooks/UseMessage.tsx
@@ -3,6 +3,7 @@ import MessageDialog from "../components/MessageDialog";
 
 const useMessage = () => {
     const [isOpen, setIsOpen] = useState(false);
+	const [resolvePromise, setResolvePromise] = useState<((value: boolean) => void) | null>(null);
 
     const [title, setTitle] = useState<string>("");
     const [subtitle, setSubtitle] = useState<string>("");
@@ -11,6 +12,9 @@ const useMessage = () => {
         setIsOpen(true);
         setTitle(title);
         setSubtitle(subtitle);
+		return new Promise((resolve) => {
+			setResolvePromise(() => resolve);
+		});
     };
 
     const handleClose = () => {
-- 
cgit v1.2.3

