Created
November 12, 2022 17:19
-
-
Save kalio007/da8bb215d19dcb4d7cb611616e7fb696 to your computer and use it in GitHub Desktop.
this snippet is to be pasted on the app.js file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './App.css'; | |
import Api from './Api'; | |
import Nav from './components/navigation'; | |
import Options from './components/options'; | |
import News from './components/news'; | |
import TheLastest from './components/lastest'; | |
import Watchlist from './components/watchlist'; | |
function App() { | |
const news = Api.map(item => { | |
return ( | |
<News | |
key = {item.id} | |
link = {item.link} | |
timestamp= {item.arrival} | |
heading = {item.heading} | |
source = {item.source} | |
/> | |
) | |
}) | |
return ( | |
<div className="App"> | |
<Nav/> | |
<body className='news-body'> | |
<Options/> | |
<div className = "newsAreas" > | |
< TheLastest /> | |
<section className='news-list'> | |
{news} | |
</section> | |
</div> | |
<div className='watchlist'> | |
<Watchlist/> | |
</div> | |
</body> | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment