Commit 599c5222 authored by Fred's avatar Fred

supaya tidak error ketika tidak ada gambar

parent 87c1d9a7
...@@ -183,7 +183,13 @@ class MenuSelection extends React.Component { ...@@ -183,7 +183,13 @@ class MenuSelection extends React.Component {
return ( return (
<View style={{ flex: 1, height: 270 }}> <View style={{ flex: 1, height: 270 }}>
<TouchableOpacity onPress={() => this.scrollToIndex(item)}> <TouchableOpacity onPress={() => this.scrollToIndex(item)}>
{item.image === '' ? (
<View style={{ height: 60, width: 60, top: 5 }} />
) :
(
<Image style={{ height: 60, width: 60, top: 5 }} source={{ uri: item.image }} /> <Image style={{ height: 60, width: 60, top: 5 }} source={{ uri: item.image }} />
)
}
</TouchableOpacity> </TouchableOpacity>
</View> </View>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment