Skip to content

Instantly share code, notes, and snippets.

@kalio007
Created November 12, 2022 17:19
Embed
What would you like to do?
this snippet is to be pasted on the app.js file
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