diff --git a/QandA/frontend/src/QuestionsData.ts b/QandA/frontend/src/QuestionsData.ts index 199b468..135c2ee 100644 --- a/QandA/frontend/src/QuestionsData.ts +++ b/QandA/frontend/src/QuestionsData.ts @@ -48,6 +48,11 @@ const questions: QuestionData[] = [ }, ]; -export const getUnansweredQuestions = (): QuestionData[] => { +export const getUnansweredQuestions = async(): Promise => { + await wait(500); return questions.filter((q) => q.answers.length === 0); }; + +const wait = (ms: number): Promise => { + return new Promise(resolve => setTimeout(resolve, ms)) +} \ No newline at end of file