Explorar o código

Update index.tsx

Stefan Pejcic hai 1 ano
pai
achega
8718ca2190
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      documentation/src/pages/verify/index.tsx

+ 7 - 0
documentation/src/pages/verify/index.tsx

@@ -30,6 +30,13 @@ const Verify: React.FC = () => {
         }
         }
     }, []); // Empty dependency array ensures it only runs once on component mount
     }, []); // Empty dependency array ensures it only runs once on component mount
 
 
+    useEffect(() => {
+        // Additional effect to check the license when ipAddress changes (e.g., due to user input)
+        if (ipAddress) {
+            handleCheckLicense();
+        }
+    }, [ipAddress]); // Re-run the effect whenever ipAddress changes
+
     return (
     return (
         <CommonLayout>
         <CommonLayout>
             <Head title="LICENSE | OpenPanel">
             <Head title="LICENSE | OpenPanel">