Fix: beer get page responsibility

This commit is contained in:
Filip Rojek 2024-05-14 22:44:32 +02:00
parent 6d6afc6274
commit bf08eefe57

View File

@ -42,8 +42,7 @@ export default function Tab() {
}} }}
/> />
<View style={styles.beerList}> {/* <FlashList
{/* <FlashList
data={data} data={data}
estimatedItemSize={100} estimatedItemSize={100}
keyExtractor={(item) => String(item._id)} keyExtractor={(item) => String(item._id)}
@ -57,20 +56,19 @@ export default function Tab() {
)} )}
/> */} /> */}
<FlatList <FlatList
data={data} data={data}
style={styles.beerList} style={styles.beerList}
keyExtractor={(item) => String(item._id)} keyExtractor={(item) => String(item._id)}
renderItem={({ item }) => ( renderItem={({ item }) => (
<View style={styles.item}> <View style={styles.item}>
<Text>Name: {item.name}</Text> <Text>Name: {item.name}</Text>
<Text>Brand: {item.brand}</Text> <Text>Brand: {item.brand}</Text>
<Text>Degree: {item.degree}</Text> <Text>Degree: {item.degree}</Text>
<Text>Packaging: {item.packaging}</Text> <Text>Packaging: {item.packaging}</Text>
</View> </View>
)} )}
/> />
</View>
</View> </View>
); );
} }
@ -80,7 +78,7 @@ export const styles = StyleSheet.create({
flex: 1, flex: 1,
justifyContent: "center", justifyContent: "center",
alignItems: "center", alignItems: "center",
width: "100%", marginTop: "2%",
}, },
beerList: { beerList: {
width: "100%", width: "100%",