Skip to content

Instantly share code, notes, and snippets.

@kalio007
Created November 12, 2022 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalio007/da8bb215d19dcb4d7cb611616e7fb696 to your computer and use it in GitHub Desktop.
Save kalio007/da8bb215d19dcb4d7cb611616e7fb696 to your computer and use it in GitHub Desktop.
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