From 095d1b5a93b35611f0288e7204e51bb582363bc6 Mon Sep 17 00:00:00 2001 From: mortezaei Date: Fri, 21 Aug 2026 21:42:11 +0330 Subject: [PATCH] fix(logs): stringify birthplace debug logs --- src/components/Componentes/question-birthplace.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Componentes/question-birthplace.tsx b/src/components/Componentes/question-birthplace.tsx index 1e81979..9d258dc 100644 --- a/src/components/Componentes/question-birthplace.tsx +++ b/src/components/Componentes/question-birthplace.tsx @@ -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(", "));