Authored by Kennaki

修复tag落地页白板bug。

... ... @@ -37,19 +37,25 @@ export default class List extends Component {
});
}
_renderHeader() {
if (this.props.type == 'editor') {
return null;
}
return (
<TouchableOpacity onPress={()=>{this.props.onPressHeader&&this.props.onPressHeader(this.props.resource.author.url)}}>
<View style={styles.headerContainer}>
<Image style={styles.avatar} source={{uri:this.props.resource.author.avatar}}/>
<Text style={styles.name}>Sphinx</Text>
</View>
</TouchableOpacity>
)
}
_renderHeader() {
let {author} = this.props.resource.toJS();
if (this.props.type == 'editor' || !author) {
return null;
}
let {
url,
avatar,
name
} = author;
return (
<TouchableOpacity onPress={()=>{this.props.onPressHeader&&this.props.onPressHeader(url)}}>
<View style={styles.headerContainer}>
<Image style={styles.avatar} source={{uri:avatar}}/>
<Text style={styles.name}>{name}</Text>
</View>
</TouchableOpacity>
)
}
render() {
let tagMap = {
... ...