mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-02-24 02:46:11 -05:00
Add compat questions if none answered
This commit is contained in:
@@ -83,11 +83,9 @@ export function CompatibilityQuestionsDisplay(props: {
|
||||
}) {
|
||||
const {isCurrentUser, user, fromSignup, fromProfilePage, profile} = props
|
||||
|
||||
const {refreshCompatibilityQuestions, compatibilityQuestions} =
|
||||
useCompatibilityQuestionsWithAnswerCount()
|
||||
const {refreshCompatibilityQuestions, compatibilityQuestions} = useCompatibilityQuestionsWithAnswerCount()
|
||||
|
||||
const {refreshCompatibilityAnswers, compatibilityAnswers} =
|
||||
useUserCompatibilityAnswers(user.id)
|
||||
const {refreshCompatibilityAnswers, compatibilityAnswers} = useUserCompatibilityAnswers(user.id)
|
||||
|
||||
const [skippedAnswers, answers] = partition(
|
||||
compatibilityAnswers,
|
||||
@@ -102,8 +100,7 @@ export function CompatibilityQuestionsDisplay(props: {
|
||||
skippedAnswers.map((answer) => answer.question_id)
|
||||
)
|
||||
|
||||
const {skippedQuestions, answeredQuestions, otherQuestions} =
|
||||
separateQuestionsArray(
|
||||
const {skippedQuestions, answeredQuestions, otherQuestions} = separateQuestionsArray(
|
||||
compatibilityQuestions,
|
||||
skippedAnswerQuestionIds,
|
||||
answeredQuestionIds
|
||||
@@ -168,6 +165,8 @@ export function CompatibilityQuestionsDisplay(props: {
|
||||
currentSlice + NUM_QUESTIONS_TO_SHOW
|
||||
)
|
||||
|
||||
if (!isCurrentUser && !answeredQuestions.length) return null
|
||||
|
||||
return (
|
||||
<Col className="gap-4">
|
||||
<Row className="flex-wrap items-center justify-between gap-x-6 gap-y-4">
|
||||
|
||||
Reference in New Issue
Block a user