Created
June 21, 2020 17:56
-
-
Save WallysonGalvao/0492221906992466c221b710db9ac4a3 to your computer and use it in GitHub Desktop.
Marvelapp
This file contains hidden or 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
{/* | |
O método onPress será o responsável pela navegação da página Home | |
para a página Deail, também estamos enviando como paramêtro um objeto | |
chamado character, que contém todas as informações do personagem. | |
*/} | |
<ScrollView horizontal showsHorizontalScrollIndicator={false}> | |
{characters | |
.filter((character) => character.category === "heroes") | |
.map((character) => ( | |
<TouchableOpacity | |
key={String(character.id)} | |
onPress={() => navigation.navigate("Detail", { character })} | |
activeOpacity={0.6} | |
> | |
<Card | |
name={character.name} | |
alterEgo={character.alterEgo} | |
imagePath={character.imagePath} | |
/> | |
</TouchableOpacity> | |
))} | |
</ScrollView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment