Created
July 10, 2020 01:50
-
-
Save peaceintheheart/35ae632bd4f6cc577de09488dd17a4d0 to your computer and use it in GitHub Desktop.
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 React from 'react'; | |
import './App.css'; | |
import List from './List'; | |
function App(props) { | |
const { store } = props; | |
// const listCards = store.lists.map(list => { | |
// return list.cardIds.map(cardId => { | |
// return store.allCards[cardId]; | |
// }); | |
// }); | |
const listCards = (cardIds) => { | |
return cardIds.map(cardId => { | |
return store.allCards[cardId]; | |
}) | |
}; | |
const listHeader = store.lists.map(list => { | |
return <List header={list.header} listCards={listCards(list.cardIds)} />; | |
}) | |
return ( | |
<main className="App"> | |
<header className = "App-header"> | |
<h1>Trelloyes!</h1> | |
</header> | |
{listHeader} | |
<div className="App-list"> | |
</div> | |
</main> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment