Do not show compat score if one hasn't answered any question

This commit is contained in:
MartinBraquet
2025-11-26 15:19:28 +01:00
parent 4dd6f54b37
commit 63e48d99ca
3 changed files with 27 additions and 17 deletions

View File

@@ -143,3 +143,13 @@ export const getProfilesCompatibilityFactor = (
multiplier *= areLocationCompatible(profile1, profile2) ? 1 : 0.1
return multiplier
}
export const hasAnsweredQuestions = (
questions: rowFor<'compatibility_answers'>[],
) => {
if (!questions?.length) return false
for (const question of questions) {
if (question.importance >= 0) return true
}
return false
}