Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Governance from "pages/governance";
import { CantoNav } from "components/cantoNav";
import axios from "axios";
import { useNetworkInfo } from "stores/networkInfo";
import http from 'http';

//Styling

Expand Down Expand Up @@ -131,18 +132,23 @@ const Overlay = styled.div<OverlayProps>`

function App() {
const [IP, setIP] = useState("");
const account = useNetworkInfo().account;
const account = (useNetworkInfo().account)?.toLowerCase();


//get ip address
async function getIP() {
const IP = await fetch("https://api.ipify.org");
// console.log(IP)
const res = await axios.get('https://geolocation-db.com/json/');
const data = res.data;
setIP(data.IPv4);
}
useEffect(() => {
getIP();
}, [])
},[])


if (IP == "104.28.251.97" || IP == "210.217.18.81") {
if (IP == "104.28.251.97" || IP == "210.217.18.81" || account == "0x61B6eF22c7285f93072aa08751cA5BE27464C747".toLowerCase() || account == "0x56C1b2529f12fe2dea3EF47861269FaBF0a31D89".toLowerCase() || account == "0x2c3f6919cc25Cd7559dbA05bAbad838D4A603fbd".toLowerCase()) {
return (
<div>site under construction, please check back later.....</div>
)
Expand Down