diff --git a/src/components/RegionPopup.tsx b/src/components/RegionPopup.tsx index f880e59e..9230be7c 100644 --- a/src/components/RegionPopup.tsx +++ b/src/components/RegionPopup.tsx @@ -1,7 +1,7 @@ -import styled from "styled-components"; import useGeoLocation from "react-ipgeolocation"; import { useSelector } from "react-redux"; import { useLocation, useNavigate } from "react-router-dom"; +import { useEffect } from "react"; import { selectUsersTotalUsdEverywhere } from "../state/valueSelectors"; import Popup from "./Popup"; @@ -77,6 +77,12 @@ const RegionPopup = (): JSX.Element | null => { const location = useLocation(); const ipLocation = useGeoLocation(); + const country = ipLocation?.country ?? null; + + useEffect(() => { + if (country) alert(country); + }, [country]); + if (!ipLocation) return null; const hasDeposits = !!deposited && !deposited.isZero();