File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,10 @@ const EditUser: React.FC = () => {
224224
225225 const avatarColorList = [ '#f56a00' , '#7265e6' , '#ffbf00' , '#00a2ae' ] ;
226226
227- const getAvatarColor = ( name ?: string ) => {
227+ const getAvatarColor = ( name ?: string , avatar ?: string ) => {
228+ if ( avatar ) {
229+ return '' ;
230+ }
228231 if ( ! name ) {
229232 return avatarColorList [ 0 ] ;
230233 }
@@ -234,9 +237,10 @@ const EditUser: React.FC = () => {
234237 const userAvatarTitle = (
235238 < div >
236239 < Avatar
240+ src = { userInfo && userInfo . avatar ? userInfo . avatar : null }
237241 style = { {
238- backgroundColor : getAvatarColor ( userInfo ?. metadata . name ) ,
239- verticalAlign : 'middle ' ,
242+ backgroundColor : getAvatarColor ( userInfo ?. metadata . name , userInfo ?. avatar ) ,
243+ verticalAlign : 'bottom ' ,
240244 } }
241245 size = { 56 }
242246 gap = { 4 }
You can’t perform that action at this time.
0 commit comments