From eefb5b01f179dfcf75ee6ec77128e1a66052e4b6 Mon Sep 17 00:00:00 2001 From: RandyJC Date: Mon, 8 Dec 2025 15:43:32 +0100 Subject: [PATCH] fix build error --- .../src/components/game/create/QuizEditor.tsx | 409 +++++++++--------- 1 file changed, 207 insertions(+), 202 deletions(-) diff --git a/packages/web/src/components/game/create/QuizEditor.tsx b/packages/web/src/components/game/create/QuizEditor.tsx index 2fcc281..aee5aac 100644 --- a/packages/web/src/components/game/create/QuizEditor.tsx +++ b/packages/web/src/components/game/create/QuizEditor.tsx @@ -429,224 +429,229 @@ const QuizEditor = ({ quizzList, onBack, onListUpdate }: Props) => { key={qIndex} className="rounded-md border border-gray-200 p-4 shadow-sm" > -
-
- Question {qIndex + 1} -
-
- -
-
- -
- - -
- - -
-
- -
- - -
-
- Media upload - - {isUploading - ? "Uploading..." - : refreshingLibrary - ? "Refreshing..." - : mediaFileName - ? "Stored" - : "Not saved"} - +
+
+ Question {qIndex + 1}
- { - const file = e.target.files?.[0] - if (file) { - handleMediaUpload(qIndex, file) - e.target.value = "" - } - }} - /> -

- Files are stored locally and served from /media. Pick a type first. -

- - {question.media && ( -
-
- - {mediaFileName || question.media.url || "No file yet"} - - {libraryEntry && ( - - {formatBytes(libraryEntry.size)} - - )} -
-
- {libraryEntry - ? `Used in ${libraryEntry.usedBy.length} question${ - libraryEntry.usedBy.length === 1 ? "" : "s" - }` - : question.media.url - ? "External media URL" - : "Upload a file or paste a URL"} -
-
- )} - - - -
- +
-
-
-
- Answers - -
+
+ -
- {question.answers.map((answer, aIndex) => ( -
- - updateQuestion(qIndex, { solution: aIndex }) - } - /> +
+ + +
+
+ +
+ + +
+
+ Media upload + + {isUploading + ? "Uploading..." + : refreshingLibrary + ? "Refreshing..." + : mediaFileName + ? "Stored" + : "Not saved"} +
- ))} + { + const file = e.target.files?.[0] + if (file) { + handleMediaUpload(qIndex, file) + e.target.value = "" + } + }} + /> +

+ Files are stored locally and served from /media. Pick a type first. +

+ + {question.media && ( +
+
+ + {mediaFileName || question.media.url || "No file yet"} + + {libraryEntry && ( + + {formatBytes(libraryEntry.size)} + + )} +
+
+ {libraryEntry + ? `Used in ${libraryEntry.usedBy.length} question${ + libraryEntry.usedBy.length === 1 ? "" : "s" + }` + : question.media.url + ? "External media URL" + : "Upload a file or paste a URL"} +
+
+ )} + + + +
+ + +
+
+
+ +
+
+ Answers + +
+ +
+ {question.answers.map((answer, aIndex) => ( +
+ + updateQuestion(qIndex, { solution: aIndex }) + } + /> + + updateAnswer(qIndex, aIndex, e.target.value) + } + placeholder={`Answer ${aIndex + 1}`} + /> + +
+ ))} +
-
- ))} + ) + })}