Implemented in Live-Game

This commit is contained in:
Mawoka
2022-10-04 15:38:15 +02:00
parent 512fc9e8ea
commit 60822283e3
11 changed files with 338 additions and 144 deletions
+3
View File
@@ -63,9 +63,12 @@ export const dataSchema = yup.object({
.lowercase(),
answers: yup.lazy((v) => {
if (Array.isArray(v)) {
console.log(v);
if (typeof v[0].right === 'boolean') {
console.log('Yup, ABCD');
return ABCDQuestionSchema;
} else {
console.log('Yup, Poll');
return VotingQuestionSchema;
}
} else {