{books.filter((item) =>{ return item.popular == true }).map((book, index) => (
<Card>
<CardImage source={book.image} />
<CardTitle title={book.title} subtitle={book.subtitle} />
<CardContent text={book.text} />
<CardAction separator={true} inColumn={false}>
<CardButton onPress={() => {}} title="Читать" color="blue" />
<CardButton
onPress={() => {}}
title="Добавить в избранное"
color="blue"
/>
</CardAction>
</Card>
))}
import React from 'react'
import { StyleSheet, View, Text } from 'react-native'
import Books from '../components/Books'
function Home() {
return (
<View style={styles.container}>
<Books />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#ebebeb'
}
})
export default Home