Revert programmatic SEO changes from wrong branch
These changes belong in their own feature/programmatic-seo branch
This commit is contained in:
@@ -32,17 +32,11 @@ export default function ExitIntentDetector() {
|
||||
try {
|
||||
const response = await fetch("/api/geoip");
|
||||
if (response.ok) {
|
||||
const contentType = response.headers.get("content-type");
|
||||
if (contentType && contentType.includes("application/json")) {
|
||||
const text = await response.text();
|
||||
if (text && text.trim()) {
|
||||
const data = JSON.parse(text);
|
||||
setCountry(data.country);
|
||||
setCountryCode(data.countryCode);
|
||||
setCity(data.city || "");
|
||||
setRegion(data.region || "");
|
||||
}
|
||||
}
|
||||
const data = await response.json();
|
||||
setCountry(data.country);
|
||||
setCountryCode(data.countryCode);
|
||||
setCity(data.city || "");
|
||||
setRegion(data.region || "");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to get country:", error);
|
||||
|
||||
Reference in New Issue
Block a user