import React, { useState, useEffect } from "react"; import Head from "@docusaurus/Head"; import { BlogFooter } from "@site/src/refine-theme/blog-footer"; import { CommonHeader } from "@site/src/refine-theme/common-header"; import { CommonLayout } from "@site/src/refine-theme/common-layout"; import clsx from "clsx"; const Verify: React.FC = () => { const [ipAddress, setIpAddress] = useState(""); const [responseData, setResponseData] = useState(null); const handleCheckLicense = async () => { try { const response = await fetch(`https://verify.openpanel.co/?ip=${ipAddress}`); const data = await response.json(); setResponseData(data); } catch (error) { console.error("Error fetching license data:", error); } }; useEffect(() => { // Check if there's an 'ip' parameter in the URL const urlParams = new URLSearchParams(window.location.search); const urlIpAddress = urlParams.get('ip'); if (urlIpAddress) { setIpAddress(urlIpAddress); handleCheckLicense(); // Automatically check the license if IP is present in the URL } }, []); // Empty dependency array ensures it only runs once on component mount return (

License Verification

setIpAddress(e.target.value)} />
{responseData && (

License Information:

{responseData.message}

{responseData.active_date &&

Active Date: {responseData.active_date}

}
)}
); }; export default Verify;