diff --git a/src/app/questions-list/[slug]/question-detail-client.tsx b/src/app/questions-list/[slug]/question-detail-client.tsx index b296194..4d5a043 100644 --- a/src/app/questions-list/[slug]/question-detail-client.tsx +++ b/src/app/questions-list/[slug]/question-detail-client.tsx @@ -17,6 +17,7 @@ import { } from "@/components/Componentes/question-answer-storage"; import QuestionExitNavigationButton from "@/components/Componentes/question-exit-navigation-button"; import QuestionRenderer from "@/components/Componentes/question-renderer"; +import { parseValue as parseBirthplaceValue } from "@/components/Componentes/question-birthplace"; import QuestionSectionFlow from "@/components/Componentes/question-section-flow"; import StickyHeader from "@/components/Componentes/sticky-header"; import TestIntroPage from "@/components/Componentes/test-intro-page"; @@ -197,10 +198,8 @@ function QuestionFlowWrapper({ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; isAnswered = emailRegex.test(String(answer).trim()); } else if (question.type === "birthplace") { - const strVal = String(answer); - const parts = strVal.split(",").map((p) => p.trim()); - isAnswered = - parts.length >= 2 && parts[0].length > 0 && parts[1].length > 0; + const parsed = parseBirthplaceValue(answer); + isAnswered = Boolean(parsed.country?.trim() && parsed.city?.trim()); } else if (question.type === "checkbox") { isAnswered = Array.isArray(answer) ? answer.length > 0 : hasAnswer; }