1
0
forked from fr/deguapp

Added: print results from API on /reviews page

This commit is contained in:
Matěj Kevin Nechodom 2024-05-15 02:29:42 +02:00
parent f1c296c0d3
commit c1805643c8

View File

@ -38,6 +38,8 @@ export default function Tab() {
"Why not?", "Why not?",
"Excellent!", "Excellent!",
]; ];
const opt2 = ["Yes", "No"];
const sourness = ["Good", "Bad"];
return ( return (
<View style={styles.container}> <View style={styles.container}>
@ -47,10 +49,12 @@ export default function Tab() {
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>Foam {opt3[item.foam - 1]}</Text>
<Text>Brand: {item.brand}</Text> <Text>Bitter / Sweetness {opt3[item.bitter_sweetness - 1]}</Text>
<Text>Degree: {item.degree}</Text> <Text>Taste {opt5[item.taste - 1]}</Text>
<Text>Packaging: {item.packaging}</Text> <Text>Packaging {opt5[item.packaging - 1]}</Text>
<Text>Sourness {sourness[item.sourness - 1]}</Text>
<Text>Would again? {opt2[item.would_again - 1]}</Text>
</View> </View>
)} )}
/> />