mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update index.tsx
This commit is contained in:
parent
181d207259
commit
d9b5da5cf3
@ -1,4 +1,4 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import Head from "@docusaurus/Head";
|
import Head from "@docusaurus/Head";
|
||||||
import { BlogFooter } from "@site/src/refine-theme/blog-footer";
|
import { BlogFooter } from "@site/src/refine-theme/blog-footer";
|
||||||
import { CommonHeader } from "@site/src/refine-theme/common-header";
|
import { CommonHeader } from "@site/src/refine-theme/common-header";
|
||||||
@ -19,6 +19,17 @@ const Verify: React.FC = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 (
|
return (
|
||||||
<CommonLayout>
|
<CommonLayout>
|
||||||
<Head title="LICENSE | OpenPanel">
|
<Head title="LICENSE | OpenPanel">
|
||||||
|
Loading…
Reference in New Issue
Block a user