Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
trazyn committed Jul 25, 2018
1 parent aaabc07 commit 961b18e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/js/components/Avatar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ export default class Avatar extends Component {
<img
className={`Avatar fade fadein ${this.props.className}`}
onClick={this.props.onClick}
onError={e => this.handleError(e)}
onLoad={e => this.handleLoad(e)}
src={this.props.src} />
onError={e => this.handleError(e)}
src={this.props.src}
/>
);
}
}
3 changes: 2 additions & 1 deletion src/js/pages/Home/ChatContent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ export default class ChatContent extends Component {
<Avatar
src={message.isme ? message.HeadImgUrl : user.HeadImgUrl}
className={classes.avatar}
onClick={ev => this.props.showUserinfo(message.isme, user)} />
onClick={ev => this.props.showUserinfo(message.isme, user)}
/>

<p
className={classes.username}
Expand Down
4 changes: 3 additions & 1 deletion src/js/pages/Home/Chats/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export default class Chats extends Component {
})}>
<img
className="disabledDrag"
src={e.HeadImgUrl} />
src={e.HeadImgUrl}
onError={e => (e.target.src = 'assets/images/user-fallback.png')}
/>
</div>

<div className={classes.info}>
Expand Down

0 comments on commit 961b18e

Please sign in to comment.