Improve UI avatar and solve delete image bug

This commit is contained in:
Qolzam
2017-08-25 16:04:55 +07:00
parent bca0752535
commit b198717ae9
15 changed files with 51 additions and 35 deletions

View File

@@ -200,6 +200,7 @@ export class UserBox extends Component {
}}>
<div onClick={() => this.props.goTo(`/${this.props.userId}`)} style={{cursor:'pointer'}}>
<UserAvatar
fullName={this.props.fullName}
fileName={this.props.avatar}
size={90}
/>
@@ -285,7 +286,8 @@ const mapStateToProps = (state, ownProps) => {
userBelongCircles: userBelongCircles || [],
belongCirclesCount: userBelongCircles.length || 0,
firstBelongCircle: userBelongCircles ? (circles ? circles[userBelongCircles[0]] : {}) : {},
avatar: state.user.info && state.user.info[ownProps.userId] ? state.user.info[ownProps.userId].avatar || '' : ''
avatar: state.user.info && state.user.info[ownProps.userId] ? state.user.info[ownProps.userId].avatar || '' : '',
fullName: state.user.info && state.user.info[ownProps.userId] ? state.user.info[ownProps.userId].fullName || '' : ''
}
}