Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Fixes identicon image (#4124)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolovim authored and evertonfraga committed Oct 16, 2018
1 parent c620110 commit 30d7e41
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions interface/components/DappIdenticon.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,11 @@ export default class DappIdenticon extends Component {
.toDataURL();
}

renderLink() {
/*
return (
<a href="{{link}}" class="dapp-identicon {{class}}" style="background-image: url('{{identiconData identity}}')" title={{i18nTextIcon}}>
<img src="{{identiconDataPixel identity}}" class='identicon-pixel'>
</a>
)
*/
}

render() {
if (!this.props.identity) {
return null;
}
const { identity } = this.props;

if (this.props.link) {
return this.renderLink();
if (!identity) {
return null;
}

// dapp class sizes: large, medium, small, tiny
Expand All @@ -66,11 +54,13 @@ export default class DappIdenticon extends Component {
className={`dapp-identicon dapp-${this.props.size}`}
title={i18n.t('elements.identiconHelper')}
style={{
backgroundImage: `url('${this.identiconData(this.props.identity)}')`
backgroundImage: `url('${this.identiconData(
identity.toLowerCase()
)}')`
}}
>
<img
src={this.identiconDataPixel(this.props.identity.toLowerCase())}
src={this.identiconDataPixel(identity.toLowerCase())}
className="identicon-pixel"
/>
</span>
Expand Down

0 comments on commit 30d7e41

Please sign in to comment.