From 99b52f72c13925fe887f82a1d209189588417c6c Mon Sep 17 00:00:00 2001 From: Chase Manning Date: Thu, 5 Oct 2023 14:47:13 +0100 Subject: [PATCH] add loggign --- src/components/RegionPopup.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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();