From 69aeb7889ac136a8e4fbe7de1330298e30345479 Mon Sep 17 00:00:00 2001
From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>
Date: Wed, 22 Oct 2025 13:59:12 +0400
Subject: feat/frontend: switch to vite, update node to v22 (#281)

---
 frontend/src/hooks/UseConfirm.tsx | 56 +++++++++++++++++++--------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

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

diff --git a/frontend/src/hooks/UseConfirm.tsx b/frontend/src/hooks/UseConfirm.tsx
index e86d70d..593427e 100644
--- a/frontend/src/hooks/UseConfirm.tsx
+++ b/frontend/src/hooks/UseConfirm.tsx
@@ -1,40 +1,40 @@
-import React, { useState } from 'react';
-import ConfirmDialog from '@components/ConfirmDialog';
+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

