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/UseConfirm.tsx | 61 ++++++++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 27 deletions(-)

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

diff --git a/frontend/src/hooks/UseConfirm.tsx b/frontend/src/hooks/UseConfirm.tsx
index e86d70d..7b4bffa 100644
--- a/frontend/src/hooks/UseConfirm.tsx
+++ b/frontend/src/hooks/UseConfirm.tsx
@@ -2,39 +2,46 @@ import React, { useState } from 'react';
 import ConfirmDialog from '@components/ConfirmDialog';
 
 const useConfirm = () => {
-    const [isOpen, setIsOpen] = useState(false);
-	const [title, setTitle] = useState<string>("");
-	const [subtitle, setSubtitle] = useState<string>("");
-    const [resolvePromise, setResolvePromise] = useState<((value: boolean) => void) | null>(null);
+  const [isOpen, setIsOpen] = useState(false);
+  const [title, setTitle] = useState<string>('');
+  const [subtitle, setSubtitle] = useState<string>('');
+  const [resolvePromise, setResolvePromise] = useState<
+    ((value: boolean) => void) | null
+  >(null);
 
-    const confirm = ( titleN: string, subtitleN: string ) => {
-        setIsOpen(true);
-		setTitle(titleN);
-		setSubtitle(subtitleN);
-        return new Promise<boolean>((resolve) => {
-            setResolvePromise(() => resolve);
-        });
-    };
+  const confirm = (titleN: string, subtitleN: string) => {
+    setIsOpen(true);
+    setTitle(titleN);
+    setSubtitle(subtitleN);
+    return new Promise<boolean>(resolve => {
+      setResolvePromise(() => resolve);
+    });
+  };
 
-    const handleConfirm = () => {
-        setIsOpen(false);
-        if (resolvePromise) {
-            resolvePromise(true);
-        }
+  const handleConfirm = () => {
+    setIsOpen(false);
+    if (resolvePromise) {
+      resolvePromise(true);
     }
+  };
 
-    const handleCancel = () => {
-        setIsOpen(false);
-        if (resolvePromise) {
-            resolvePromise(false);
-        }
+  const handleCancel = () => {
+    setIsOpen(false);
+    if (resolvePromise) {
+      resolvePromise(false);
     }
+  };
 
-    const ConfirmDialogComponent = isOpen && (
-        <ConfirmDialog title={title} subtitle={subtitle} onConfirm={handleConfirm} onCancel={handleCancel}></ConfirmDialog>
-    );
+  const ConfirmDialogComponent = isOpen && (
+    <ConfirmDialog
+      title={title}
+      subtitle={subtitle}
+      onConfirm={handleConfirm}
+      onCancel={handleCancel}
+    ></ConfirmDialog>
+  );
 
-    return { confirm, ConfirmDialogComponent };
-}
+  return { confirm, ConfirmDialogComponent };
+};
 
 export default useConfirm;
-- 
cgit v1.2.3

