Browse Source

fixed avatar of add member autocomplete popup

Skylsmoi 6 years ago
parent
commit
c1612d91f4

+ 3 - 2
frontend/src/component/Dashboard/MemberList.jsx View File

@@ -1,6 +1,7 @@
1 1
 import React from 'react'
2 2
 import PropTypes from 'prop-types'
3 3
 // import { Checkbox } from 'tracim_frontend_lib'
4
+import { generateAvatarFromPublicName } from 'tracim_frontend_lib'
4 5
 
5 6
 require('./MemberList.styl')
6 7
 
@@ -110,8 +111,8 @@ export class MemberList extends React.Component {
110 111
                             onClick={() => props.onClickKnownMember(u)}
111 112
                             key={u.user_id}
112 113
                           >
113
-                            <div className='autocomplete__item__avatar primaryColorBorder'>
114
-                              <img src={u.avatar_url} />
114
+                            <div className='autocomplete__item__avatar'>
115
+                              <img src={u.avatar_url ? u.avatar_url : generateAvatarFromPublicName(u.public_name)} />
115 116
                             </div>
116 117
 
117 118
                             <div className='autocomplete__item__name'>

+ 0 - 2
frontend/src/component/Dashboard/MemberList.styl View File

@@ -97,8 +97,6 @@
97 97
               width 45px
98 98
               height 45px
99 99
               border-radius 50%
100
-              border-width 1px
101
-              border-style solid
102 100
             &__name
103 101
               margin-left 15px
104 102
       .name__input