|
|
@@ -1,15 +1,23 @@ |
|
|
|
import React from 'react'; |
|
|
|
import React, {useState, useEffect} from 'react'; |
|
|
|
import ReactDOM from 'react-dom'; |
|
|
|
|
|
|
|
import Header from './Header.jsx'; |
|
|
|
import Feed from './Feed.jsx'; |
|
|
|
import Navigator from './Navigator.jsx'; |
|
|
|
import Archive from './Archive.jsx'; |
|
|
|
|
|
|
|
const App = () => { |
|
|
|
const [recent, setRecent] = useState(true) |
|
|
|
return ( |
|
|
|
<div className='container'> |
|
|
|
<Header/> |
|
|
|
<Navigator onPageChange={ (r) => setRecent(r) } |
|
|
|
recent={recent}/> |
|
|
|
<div className="container-view"> |
|
|
|
<Feed></Feed> |
|
|
|
{recent |
|
|
|
? <Feed/> |
|
|
|
: <Archive/> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|