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 (

IP Address:
- {ipData?.query || } + {ipData?.ip || }

+

+ Network:
+ {ipData?.network || } +

-

Country: {ipData?.country || } ({ipData?.countryCode || })

-

Region: {ipData?.regionName || } ({ipData?.region || })

-

City: {ipData?.city || } {ipData?.zip || }

+

Country: {ipData?.country_name || } ({ipData?.country_code || })

+

Region: {ipData?.region || }

+

City: {ipData?.city || } {ipData?.postal || }

-

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 || }

diff --git a/package-lock.json b/package-lock.json index 217ff25..3885c6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "solun", - "version": "0.3.9", + "version": "0.3.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "solun", - "version": "0.3.9", + "version": "0.3.10", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.4.0", "@fortawesome/free-solid-svg-icons": "^6.4.0", diff --git a/package.json b/package.json index 79c7884..45f0f65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "solun", - "version": "0.3.9", + "version": "0.3.10", "private": true, "scripts": { "dev": "next dev",