2022-03-26 16:03:57 +11:00
|
|
|
import React, { useEffect } from 'react';
|
2022-03-26 14:10:10 +11:00
|
|
|
import { PageTitle } from './PageTitle';
|
|
|
|
import { Page } from './Page';
|
2022-03-26 00:08:00 +11:00
|
|
|
import { QuestionList } from './QuestionList';
|
|
|
|
import { getUnansweredQuestions } from './QuestionsData';
|
2022-03-24 00:02:35 +11:00
|
|
|
|
2022-03-26 16:03:57 +11:00
|
|
|
export const HomePage = () => {
|
|
|
|
useEffect(() => {
|
|
|
|
console.log('first rendered');
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Page>
|
|
|
|
<div>
|
|
|
|
<PageTitle>Unanswered Questions</PageTitle>
|
|
|
|
<button>Ask a question</button>{' '}
|
|
|
|
{/* This button component is passed as children of Page */}
|
|
|
|
</div>
|
|
|
|
{/* <QuestionList
|
|
|
|
data={getUnansweredQuestions()}
|
|
|
|
/> */}
|
|
|
|
</Page>
|
|
|
|
);
|
|
|
|
};
|