add questions query
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import React, { FC } from "react";
|
||||
import { QuestionCard } from "./QuestionCard";
|
||||
import { Question } from "../../../__generated__/graphql-schema";
|
||||
|
||||
interface Props {
|
||||
questions: string[]
|
||||
questions: Question[]
|
||||
onAddQuestion: Function,
|
||||
onRemoveQuestion: Function
|
||||
}
|
||||
@@ -11,7 +12,7 @@ export const QuestionArea: FC<Props> = ({ questions, onAddQuestion, onRemoveQues
|
||||
return (
|
||||
<div className="col-span-3 border-l-2 border-r-2 border-gray-300 px-6">
|
||||
{questions.map(question =>
|
||||
<QuestionCard title={question}
|
||||
<QuestionCard key={question.id} question={question}
|
||||
onAddQuestion={onAddQuestion}
|
||||
onRemoveQuestion={onRemoveQuestion}/>)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user