export async function lookupIp(ip = "8.8.8.8") {
const gatewayBaseUrl = https://locations.humade.studio
const response = await fetch(`${gatewayBaseUrl}/v1/location?ip=${ip}`, {
method: "GET",
headers: {
Accept: "application/json",
Authorization: `Bearer loc_demo_UoCHBpiucRXIesN7xOta06yk0bsjk9yQ`,
},
})
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`)
}
const result = await response.json()
return result
}