non auth part
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user