2022-03-25 13:26:47 +11:00
|
|
|
import React from 'react';
|
2022-03-26 00:08:00 +11:00
|
|
|
import { Question } from './Question';
|
2022-03-25 13:26:47 +11:00
|
|
|
import { QuestionData } from './QuestionsData';
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
data: QuestionData[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export const QuestionList = ({ data }: Props) => (
|
|
|
|
<ul>
|
|
|
|
{data.map((question) => (
|
2022-03-26 00:08:00 +11:00
|
|
|
<li key={question.questionId}>
|
|
|
|
<Question data={question} />
|
|
|
|
</li>
|
2022-03-25 13:26:47 +11:00
|
|
|
))}
|
|
|
|
</ul>
|
|
|
|
);
|