diff --git a/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx b/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx index 1743953..5fba0e6 100644 --- a/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx +++ b/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx @@ -23,11 +23,11 @@ interface QuestionListProps { } class QuestionList extends React.Component { - renderTextWidget = ({ questions, value, index }: InputProps) => ( + renderTextWidget = ({ questions, value, index }: InputProps): JSX.Element => ( ); - handleNameInputChange = (questions: Question[], index: number) => (event) => { + handleNameInputChange = (questions: Question[], index: number): React.ChangeEventHandler => (event) => { const { onChange } = this.props; const val = event.target.value; // eslint-disable-next-line no-param-reassign @@ -35,14 +35,14 @@ class QuestionList extends React.Component { onChange(questions); }; - handleElementRemove = (questions: Question[], index: number) => () => { + handleElementRemove = (questions: Question[], index: number) => (): void => { const { onChange } = this.props; const newQuestions = [...questions]; newQuestions.splice(index, 1); onChange(newQuestions); }; - renderQuestions() { + renderQuestions(): JSX.Element[] { const { questions, onChange } = this.props; return questions.map((q, index) => { const nameWidgetProps = { @@ -77,7 +77,7 @@ class QuestionList extends React.Component { }); } - render() { + render(): JSX.Element { const { placeholder, innerRef } = this.props; return (