aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/hooks/UseConfirm.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/hooks/UseConfirm.tsx')
-rw-r--r--frontend/src/hooks/UseConfirm.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/src/hooks/UseConfirm.tsx b/frontend/src/hooks/UseConfirm.tsx
index 593427e..a7e6bef 100644
--- a/frontend/src/hooks/UseConfirm.tsx
+++ b/frontend/src/hooks/UseConfirm.tsx
@@ -21,20 +21,20 @@ const useConfirm = () => {
21 if (resolvePromise) { 21 if (resolvePromise) {
22 resolvePromise(true); 22 resolvePromise(true);
23 } 23 }
24 } 24 };
25 25
26 const handleCancel = () => { 26 const handleCancel = () => {
27 setIsOpen(false); 27 setIsOpen(false);
28 if (resolvePromise) { 28 if (resolvePromise) {
29 resolvePromise(false); 29 resolvePromise(false);
30 } 30 }
31 } 31 };
32 32
33 const ConfirmDialogComponent = isOpen && ( 33 const ConfirmDialogComponent = isOpen && (
34 <ConfirmDialog title={title} subtitle={subtitle} onConfirm={handleConfirm} onCancel={handleCancel}></ConfirmDialog> 34 <ConfirmDialog title={title} subtitle={subtitle} onConfirm={handleConfirm} onCancel={handleCancel}></ConfirmDialog>
35 ); 35 );
36 36
37 return { confirm, ConfirmDialogComponent }; 37 return { confirm, ConfirmDialogComponent };
38} 38};
39 39
40export default useConfirm; 40export default useConfirm;