Skip to content

Commit

Permalink
fix: UserMenu default image (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
braianj authored Jan 3, 2024
1 parent c7c3272 commit e687763
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
22 changes: 19 additions & 3 deletions src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,26 @@
height: 110%;
margin-left: -100px;
margin-bottom: -100px;
width: 100%;
}

.dui-user-menu-signed-in .menu-wrapper .menu-wearable-preview.default-avatar {
margin-left: -50px;
height: 100%;
}

.dui-user-menu-signed-in .menu-wrapper .menu-wearable-preview div {
height: 100%;
width: 100%;
background-repeat: no-repeat;
background-size: contain;
}

.dui-user-menu-signed-in
.menu-wrapper
.menu-wearable-preview.default-avatar
div {
background-image: url('../../../assets/man-default.png');
}

.dui-user-menu-signed-in
Expand Down Expand Up @@ -250,15 +266,15 @@

.dui-user-menu-signed-in .menu-wrapper .menu-wearable-preview.default-avatar {
margin-left: -30px;
height: 400px;
margin-bottom: -100px;
}

.dui-user-menu-signed-in
.menu-wrapper
.menu-wearable-preview.default-avatar
img {
height: 400px;
div {
margin-top: 50px;
margin-left: 50px;
}

.dui-user-menu-signed-in .menu-option__sign-out {
Expand Down
9 changes: 7 additions & 2 deletions src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import LogoutIcon from '../../Icons/LogoutIcon'
import Notifications from '../../Notifications/Notifications'
import ArrowIcon from '../../Icons/ArrowIcon'
import { config } from '../../../config'
import mansDefault from '../../../assets/man-default.png'
import { UserMenuEventId } from '../UserMenu.types'

import '../UserMenu.css'
Expand Down Expand Up @@ -177,7 +176,13 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => {
!avatar && 'default-avatar'
)}
>
<img src={avatar?.avatar?.snapshots?.body || mansDefault} />
<div
style={
avatar?.avatar?.snapshots?.body && {
backgroundImage: `url(${avatar?.avatar?.snapshots?.body})`
}
}
></div>
</div>
<div className="menu-actions__wrapper">
<div className={'menu-info'}>
Expand Down

1 comment on commit e687763

@vercel
Copy link

@vercel vercel bot commented on e687763 Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

decentraland-ui – ./

decentraland-ui-git-master-decentraland1.vercel.app
decentraland-ui-decentraland1.vercel.app

Please sign in to comment.