fix(client): review pages (#57086)

This commit is contained in:
Tom
2024-11-07 14:09:03 -06:00
committed by GitHub
parent a42bed6e5e
commit 8c040a9d46
3 changed files with 3 additions and 2 deletions

View File

@@ -254,7 +254,7 @@ const ShowGeneric = ({
/>
)}
{!!questions && (
{questions.length > 0 && (
<MultipleChoiceQuestions
questions={questions}
selectedOptions={selectedMcqOptions}

View File

@@ -324,6 +324,7 @@ function generateChallengeCreator(lang, englishPath, i18nPath) {
if (!challenge.description) challenge.description = '';
if (!challenge.instructions) challenge.instructions = '';
if (!challenge.questions) challenge.questions = [];
// const superOrder = getSuperOrder(meta.superBlock);
// NOTE: Use this version when a super block is in beta.

View File

@@ -243,7 +243,7 @@ const schema = Joi.object()
challengeTypes.theOdinProject
],
then: Joi.array().items(questionJoi).min(1).required(),
otherwise: Joi.forbidden()
otherwise: Joi.array().length(0)
}),
quizzes: Joi.when('challengeType', {
is: challengeTypes.quiz,