Cant manage to fetch ip

Hello, i have an issue with code that i can resolve. I managed to connet geolocation detection to my wix website and to make my website adapt based on the detected city. However using googlemaps api takes some time and i figured out that ip detection is much faster. I found some code example but i cant manage to make them work. Here it is:

import { fetch } from ‘wix-fetch’;
$w.onReady(function () {
getIP();
}); ​
function getIP(){
fetch(‘https://extreme-ip-lookup.com/json’, {
method: ‘get’
})
.then((httpResponse) => {
if (httpResponse.ok) {
return httpResponse.json();
}
})
.then((json) => {
const ipAddress = json.query;
const country = json.country;
const city = json.city;
$w(“#text1”).text = city;
return city;
});
}

“text1” does not change for me and i recieve no log messages. I tryed to place it in backend, public, site or page code but still no result…