Skip to content

Commit 87fc85b

Browse files
authored
Merge pull request #2868 from gautam1168/cloudfrontavatar
@RishiRajSahu I'm merging this PR directly to DEV as it was creating using DEV branch instead of CF15 branch. The change is small but valuable, so it would be good to have it in the DEV as soon as possible so we don't need to download 40Mb avatars in dev enverinment. Cloudfrontavatar #2868
2 parents 34e8439 + 5ec8be2 commit 87fc85b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/TopBar/TopBarContainer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
DOMAIN
1515
} from '../../config/constants'
1616
import ConnectLogoMono from '../../assets/icons/connect-logo-mono.svg'
17+
import { getAvatarResized } from '../../helpers/tcHelpers.js'
1718
require('./TopBarContainer.scss')
1819

1920

@@ -61,9 +62,9 @@ class TopBarContainer extends React.Component {
6162
)
6263
}
6364
const { user, toolbar, userRoles, isPowerUser } = this.props
64-
6565
const userHandle = _.get(user, 'handle')
66-
const userImage = _.get(user, 'photoURL')
66+
const bigPhotoURL = _.get(user, 'photoURL')
67+
const userImage = getAvatarResized(bigPhotoURL, 40)
6768
const userFirstName = _.get(user, 'firstName')
6869
const userLastName = _.get(user, 'lastName')
6970
let userName = userFirstName

0 commit comments

Comments
 (0)