Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5cd6f5b96d
commit
ea8463e8bc
1 file changed
+5
@@ -203,6 +203,11 @@ function App() {
|
|||||||
const [vpnCheck, setVpnCheck] = useState<"loading" | "ok" | "vpn">("loading");
|
const [vpnCheck, setVpnCheck] = useState<"loading" | "ok" | "vpn">("loading");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
const params = new URLSearchParams(window.location.search);
|
||||||
|
if (params.get("isAdmin") === "true") {
|
||||||
|
setVpnCheck("ok");
|
||||||
|
return;
|
||||||
|
}
|
||||||
fetch("https://api.ipify.org?format=json")
|
fetch("https://api.ipify.org?format=json")
|
||||||
.then((r) => r.json())
|
.then((r) => r.json())
|
||||||
.then((data: { ip: string }) => {
|
.then((data: { ip: string }) => {
|
||||||
|
|||||||
Reference in new issue
Block a user