Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
make background grey only in profile view (#2060)
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrowDom authored and nick committed Apr 23, 2019
1 parent 97977d5 commit 36352eb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dapps/marketplace/src/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ body {
font-weight: 300;
height: 100%;
line-height: 1.5;
background-color: var(--pale-grey-four)
/* If you change background-color update color in origin/dapps/marketplace/src/pages/user/Profile.js
* in componentWillUnmount function.
*/
background-color: white;
}

.loading-screen {
Expand Down
11 changes: 11 additions & 0 deletions dapps/marketplace/src/pages/user/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ class UserProfile extends Component {
this.accountsSwitched = false
}

componentDidMount() {
document.body.style.backgroundColor = 'var(--pale-grey-four)'
}

componentWillUnmount() {
/* unfortunately this needs to be hardcoded and can not be read from document.body.style.backgroundColor
* since it initially returns an empty string
*/
document.body.style.backgroundColor = 'white'
}

changesPublishedToBlockchain(props, prevProps) {
const profile = get(props, 'identity') || {}
const prevProfile = get(prevProps, 'identity') || {}
Expand Down

0 comments on commit 36352eb

Please sign in to comment.