From 68d89c0bbcc10c7f692526f91c43c31b7d01c6fd Mon Sep 17 00:00:00 2001
From: xXJSONDeruloXx <danielhimebauch@gmail.com>
Date: Thu, 23 Jan 2025 12:50:33 -0500
Subject: made install/uninstall status on timer, rewording patch status

---
 src/index.tsx | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index 3a54070..390454b 100755
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -50,6 +50,26 @@ function FGModInstallerSection() {
     return () => clearInterval(intervalId); // Cleanup interval on component unmount
   }, []);
 
+  useEffect(() => {
+    if (installResult) {
+      const timer = setTimeout(() => {
+        setInstallResult(null);
+      }, 5000);
+      return () => clearTimeout(timer);
+    }
+    return () => {}; // Ensure a cleanup function is always returned
+  }, [installResult]);
+
+  useEffect(() => {
+    if (uninstallResult) {
+      const timer = setTimeout(() => {
+        setUninstallResult(null);
+      }, 5000);
+      return () => clearTimeout(timer);
+    }
+    return () => {}; // Ensure a cleanup function is always returned
+  }, [uninstallResult]);
+
   const handleInstallClick = async () => {
     setInstalling(true);
     const result = await runInstallFGMod();
@@ -119,7 +139,7 @@ function FGModInstallerSection() {
       {pathExists !== null && (
         <PanelSectionRow>
           <div style={{ color: pathExists ? "green" : "red" }}>
-            {pathExists ? "Ready to Patch" : "Mod Not Installed"}
+            {pathExists ? "Patch Is Installed" : "Patch Not Installed"}
           </div>
         </PanelSectionRow>
       )}
-- 
cgit v1.2.3

