diff --git a/app/ip/page.tsx b/app/ip/page.tsx index ee5c2b8..6b8b8b4 100644 --- a/app/ip/page.tsx +++ b/app/ip/page.tsx @@ -16,10 +16,10 @@ const ipInformations = () => { const [ipData, setIpData] = useState(null) as any; useEffect(() => { - fetch('http://ip-api.com/json/') + fetch('https://ipapi.co/json/') .then(response => response.json()) .then(data => { - if (data.status === 'success') { + if (data) { setIpData(data); } else { toast.error('Error while fetching IP informations'); @@ -41,24 +41,27 @@ return (
Country: {ipData?.country ||
Region: {ipData?.regionName ||
City: {ipData?.city ||
Country: {ipData?.country_name ||
Region: {ipData?.region ||
City: {ipData?.city ||
Latitude: {ipData?.lat ||
Longitude: {ipData?.lon ||
Latitude: {ipData?.latitude ||
Longitude: {ipData?.longitude ||
Timezone: {ipData?.timezone ||
ISP: {ipData?.isp ||
Organization: {ipData?.org ||
AS: {ipData?.as ||
ASN: {ipData?.asn ||