|
|
|
@ -274,14 +274,14 @@ export function QuestionBirthplace({ |
|
|
|
} |
|
|
|
const updated = parseValue(rawValue); |
|
|
|
const resolvedC = resolveCountryName(updated.country, locale) || updated.country; |
|
|
|
console.log("[BIRTHPLACE_DEBUG] 🔄 External sync triggered:", { |
|
|
|
console.log("[BIRTHPLACE_DEBUG] 🔄 External sync triggered: " + JSON.stringify({ |
|
|
|
rawValue, |
|
|
|
lastInternal: lastInternalAnswerRef.current, |
|
|
|
parsed: updated, |
|
|
|
resolvedCountry: resolvedC, |
|
|
|
currentSelectedCountry: selectedCountry, |
|
|
|
currentCityInput: cityInput, |
|
|
|
}); |
|
|
|
})); |
|
|
|
if (resolvedC !== selectedCountry) { |
|
|
|
setSelectedCountry(resolvedC); |
|
|
|
} |
|
|
|
@ -303,10 +303,10 @@ export function QuestionBirthplace({ |
|
|
|
if (typeof window !== "undefined") { |
|
|
|
localStorage.setItem("hasCheckedGeoIPResidence", "true"); |
|
|
|
} |
|
|
|
console.log("[BIRTHPLACE_DEBUG] 🚩 handleSelectCountry called:", { |
|
|
|
console.log("[BIRTHPLACE_DEBUG] 🚩 handleSelectCountry called: " + JSON.stringify({ |
|
|
|
chosenCountry: country, |
|
|
|
currentCityInput: cityInput, |
|
|
|
}); |
|
|
|
})); |
|
|
|
setSelectedCountry(country); |
|
|
|
closeSheet(); |
|
|
|
updateAnswers(country, cityInput); |
|
|
|
@ -321,10 +321,10 @@ export function QuestionBirthplace({ |
|
|
|
localStorage.setItem("hasCheckedGeoIPResidence", "true"); |
|
|
|
} |
|
|
|
const newCity = e.target.value; |
|
|
|
console.log("[BIRTHPLACE_DEBUG] ✍️ handleCityChange called:", { |
|
|
|
console.log("[BIRTHPLACE_DEBUG] ✍️ handleCityChange called: " + JSON.stringify({ |
|
|
|
currentSelectedCountry: selectedCountry, |
|
|
|
typedCity: newCity, |
|
|
|
}); |
|
|
|
})); |
|
|
|
setCityInput(newCity); |
|
|
|
updateAnswers(selectedCountry, newCity); |
|
|
|
setDetectedLocation([newCity, selectedCountry].filter(Boolean).join(", ")); |
|
|
|
|