Created
October 4, 2018 21:55
-
-
Save jjn1056/3155bc2459bbf321795ffb14be380623 to your computer and use it in GitHub Desktop.
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
| renderRow(data) { | |
| return ( | |
| <Text>{`\u2022 ${data}`}</Text> | |
| ); | |
| } | |
| render() { | |
| const { productDataLoaded } = this.state; | |
| if (productDataLoaded === false) { | |
| return <Text>No product scanned!</Text>; | |
| } | |
| return ( | |
| <View style={styles.productView}> | |
| <Text style={{ color: 'black' }}> | |
| PRODUCT NAME: {this.state.productData.product_name} | |
| </Text> | |
| <Text style={{ color: 'black' }}> | |
| <ListView | |
| style={{margin: 40}} | |
| dataSource={this.state.productData.ingredients_text_en.split(',')} | |
| renderRow={this.renderRow} | |
| /> | |
| </Text> | |
| </View> | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment