import React from 'react'; import { LinkListItem } from './linkListItem.jsx' // interface QuestionListProps { // showOnlyArchived: boolean; // questions: Array; // basePath: string; // } // export class QuestionList extends React.Component { constructor(props: any) { super(props) this.renderListItems = this.renderListItems.bind(this) } renderListItems() { const questions = this.props.questions; if (questions.length !== 0) { let filtered; if (!this.props.showOnlyArchived) { filtered = questions.filter((question: any) => question.flag !== "archived" ) } else { filtered = questions.filter((question: any) => question.flag === "archived" ) } return filtered.map((question: any) => ( )); } } render() { return (
    {this.renderListItems()}
); } }