diff --git a/frontend/src/app.tsx b/frontend/src/app.tsx
index 050a983..9ee85dc 100644
--- a/frontend/src/app.tsx
+++ b/frontend/src/app.tsx
@@ -1,12 +1,12 @@
import { Route, Router } from '@solidjs/router'
import { Quiz } from 'quiz.tsx'
-import { CreateQuestion } from './pages/CreateQuestion/CreateQuestion.tsx'
+import { CreateQuestionForm } from './pages/CreateQuestion.tsx'
import { QuestionList } from 'questions.tsx'
export const App = () => (
-
+
)
diff --git a/frontend/src/pages/CreateQuestion/CreateQuestion.tsx b/frontend/src/pages/CreateQuestion.tsx
similarity index 94%
rename from frontend/src/pages/CreateQuestion/CreateQuestion.tsx
rename to frontend/src/pages/CreateQuestion.tsx
index c530080..3c76843 100644
--- a/frontend/src/pages/CreateQuestion/CreateQuestion.tsx
+++ b/frontend/src/pages/CreateQuestion.tsx
@@ -5,10 +5,12 @@ type Question = {
question: string
answers: string[]
correctAnswer: number | null
+ explanations: string[]
+ questionExplanation: string
quizType: string
}
-export function CreateQuestion() {
+export function CreateQuestionForm() {
const [question, setQuestion] = createSignal('')
const [answers, setAnswers] = createSignal(['', '', '', ''])
const [correctAnswer, setCorrectAnswer] = createSignal(null)
@@ -21,6 +23,8 @@ export function CreateQuestion() {
question: formData.question,
answers: formData.answers,
correctAnswer: formData.correctAnswer,
+ explanations: formData.explanations,
+ questionExplanations: formData.questionExplanation,
quizType: 'SINGLE',
}
fetch('/api/quiz-question', {
@@ -67,8 +71,8 @@ export function CreateQuestion() {
answers: answers(),
correctAnswer: correctAnswer(),
quizType: 'SINGLE',
- // questionExplanations: questionExplanations(),
- // generalExplanations: answerExplanation(),
+ explanations: questionExplanations(),
+ questionExplanation: answerExplanation(),
}
console.log(formData) // Handle form data submission
postData(formData)
diff --git a/frontend/src/pages/CreateQuestion/createQuestion.css b/frontend/src/pages/createQuestion.css
similarity index 100%
rename from frontend/src/pages/CreateQuestion/createQuestion.css
rename to frontend/src/pages/createQuestion.css