Skip to content

Commit

Permalink
Use const for image
Browse files Browse the repository at this point in the history
  • Loading branch information
rickycodes committed Sep 2, 2020
1 parent 9323ff4 commit 5fad95d
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions app/components/UI/Identicon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,21 @@ const Identicon = React.memo(props => {
const { diameter, address, customStyle, noFadeIn, useBlockieIcon } = props;
if (!address) return null;

let image;
if (useBlockieIcon) {
const uri = toDataUrl(address);

image = (
<Image
source={{ uri }}
style={[
{
height: diameter,
width: diameter,
borderRadius: diameter / 2
},
customStyle
]}
/>
);
} else {
image = <Jazzicon size={diameter} address={address} />;
}
const image = useBlockieIcon ? (
<Image
source={toDataUrl(address)}
style={[
{
height: diameter,
width: diameter,
borderRadius: diameter / 2
},
customStyle
]}
/>
) : (
<Jazzicon size={diameter} address={address} />
);

if (noFadeIn) {
return image;
Expand Down

0 comments on commit 5fad95d

Please sign in to comment.