Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- renderRow(post) {
- var datePosted = new Date(post.publish_date).toString();
- return(
- <TouchableHighlight underlayColor='transparent' onPress={() => this.onPostPress(post)}>
- <View style={styles.row}>
- <Image style={styles.image} source={{uri: post.featured_image.replace(/^http:///i, 'https://')}} /> {/* Here's the error */}
- <View style={styles.info}>
- <Text style={styles.title}>{post.title}</Text>
- <Text style={styles.author}>Por {post.author_name}</Text>
- <Text style={styles.date}>{datePosted.substr(4,11)}</Text>
- <Text numberOfLines={3} style={styles.description}>{post.meta_description}..</Text>
- </View>
- </View>
- </TouchableHighlight>
- );
- }
- render() {
- return(
- <ListView
- dataSource={this.state.dataSource}
- renderRow={this.renderRow.bind(this)}
- style={styles.page}
- />
- );
- }
- if(post.featured_image != undefined) {
- var imageHttps = post.featured_image.replace(/^http:///i, 'https://');
- }
Add Comment
Please, Sign In to add comment