diff options
Diffstat (limited to 'src/components/QuizGroupSection.tsx')
| -rw-r--r-- | src/components/QuizGroupSection.tsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/components/QuizGroupSection.tsx b/src/components/QuizGroupSection.tsx new file mode 100644 index 0000000..b2bbee7 --- /dev/null +++ b/src/components/QuizGroupSection.tsx @@ -0,0 +1,19 @@ +import type { QuizGroup } from "../quiz"; +import QuizSection from "./QuizSection"; + +type Props = { + quizGroup: QuizGroup; +}; + +function QuizGroupSection({ quizGroup }: Props) { + return ( + <section> + <h2>{quizGroup.label}</h2> + {quizGroup.quizzes.map((quiz) => ( + <QuizSection key={quiz.label} quiz={quiz} /> + ))} + </section> + ); +} + +export default QuizGroupSection; |
