summaryrefslogtreecommitdiffstats
path: root/web/react/components/user_profile.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-10-16 09:15:30 -0700
committerCorey Hulen <corey@hulen.com>2015-10-16 09:15:30 -0700
commit3bd0a15341a5cff29c172aed73cda688e63fb7e7 (patch)
tree31e8f80c3a365a607754b7e49910729d49343e24 /web/react/components/user_profile.jsx
parent9c045f0d4bdf254f57b94356fd2f5f2a2408ed03 (diff)
parent495673d80d75ddfc97dc8d9fe61021142418dcc2 (diff)
downloadchat-3bd0a15341a5cff29c172aed73cda688e63fb7e7.tar.gz
chat-3bd0a15341a5cff29c172aed73cda688e63fb7e7.tar.bz2
chat-3bd0a15341a5cff29c172aed73cda688e63fb7e7.zip
Merge pull request #1089 from mattermost/client-warning-fixes
Fixing some client warnings
Diffstat (limited to 'web/react/components/user_profile.jsx')
-rw-r--r--web/react/components/user_profile.jsx37
1 files changed, 27 insertions, 10 deletions
diff --git a/web/react/components/user_profile.jsx b/web/react/components/user_profile.jsx
index 715161b4f..da0c1aaf9 100644
--- a/web/react/components/user_profile.jsx
+++ b/web/react/components/user_profile.jsx
@@ -65,19 +65,29 @@ export default class UserProfile extends React.Component {
var dataContent = [];
dataContent.push(
- <img className='user-popover__image'
+ <img
+ className='user-popover__image'
src={'/api/v1/users/' + this.state.profile.id + '/image?time=' + this.state.profile.update_at}
height='128'
width='128'
+ key='user-popover-image'
/>
);
if (!global.window.config.ShowEmailAddress === 'true') {
- dataContent.push(<div className='text-nowrap'>{'Email not shared'}</div>);
+ dataContent.push(
+ <div
+ className='text-nowrap'
+ key='user-popover-no-email'
+ >
+ {'Email not shared'}
+ </div>
+ );
} else {
dataContent.push(
<div
data-toggle='tooltip'
title="' + this.state.profile.email + '"
+ key='user-popover-email'
>
<a
href="mailto:' + this.state.profile.email + '"
@@ -93,15 +103,22 @@ export default class UserProfile extends React.Component {
<OverlayTrigger
trigger='click'
placement='right'
- rootClose='true'
- overlay={<Popover title={this.state.profile.username}>{dataContent}</Popover>}
- >
- <div
- className='user-popover'
- id={'profile_' + this.uniqueId}
+ rootClose={true}
+ overlay={
+ <Popover
+ title={this.state.profile.username}
+ id='user-profile-popover'
+ >
+ {dataContent}
+ </Popover>
+ }
>
- {name}
- </div>
+ <div
+ className='user-popover'
+ id={'profile_' + this.uniqueId}
+ >
+ {name}
+ </div>
</OverlayTrigger>
);
}