non auth part

This commit is contained in:
Mikan
2025-06-01 20:55:44 +03:00
parent 9c6272db25
commit 35ed595edc
6 changed files with 70 additions and 44 deletions

View File

@@ -106,9 +106,11 @@ export function SurveyPage() {
/>
)} />
{isCompleted && (
<button onClick={calculateResults}>Завершить тест</button>
)}
<>
{isCompleted && (
<button onClick={calculateResults}>Завершить тест</button>
)}
</>
</LoadingData>
</div>
);
@@ -125,7 +127,7 @@ function QuestionBlock({
}) {
switch (question.questionType) {
case QuestionType.AgreementQuestion:
const agreementQuestion = question as AgreementQuestion;
{ const agreementQuestion = question as AgreementQuestion;
return (
<div className={`question agreement ${answered !== undefined ? "answered" : "unanswered"}`}>
{agreementQuestion.question}
@@ -139,10 +141,10 @@ function QuestionBlock({
onClick={() => onAnswer(`${question.questionType}_${question.id}`, 0)}>Не согласен</button>
</div>
);
); }
case QuestionType.QuestionPair:
const pairQuestion = question as QuestionPair;
{ const pairQuestion = question as QuestionPair;
return (
<div className={`question pair ${answered !== undefined ? "answered" : "unanswered"}`}>
{pairQuestion.statements.map((statement) => (
@@ -156,7 +158,7 @@ function QuestionBlock({
</button>
))}
</div>
);
); }
default:
return null;