Small testability fixes
This commit is contained in:
parent
23234fb1aa
commit
29674a0e65
@ -19,6 +19,8 @@ import { connect } from 'react-redux';
|
|||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import ContractIcon from 'material-ui/svg-icons/action/code';
|
import ContractIcon from 'material-ui/svg-icons/action/code';
|
||||||
|
|
||||||
|
import { createIdentityImg } from '~/api/util/identity';
|
||||||
|
|
||||||
import styles from './identityIcon.css';
|
import styles from './identityIcon.css';
|
||||||
|
|
||||||
class IdentityIcon extends Component {
|
class IdentityIcon extends Component {
|
||||||
@ -29,12 +31,12 @@ class IdentityIcon extends Component {
|
|||||||
static propTypes = {
|
static propTypes = {
|
||||||
address: PropTypes.string,
|
address: PropTypes.string,
|
||||||
button: PropTypes.bool,
|
button: PropTypes.bool,
|
||||||
className: PropTypes.string,
|
|
||||||
center: PropTypes.bool,
|
center: PropTypes.bool,
|
||||||
padded: PropTypes.bool,
|
className: PropTypes.string,
|
||||||
inline: PropTypes.bool,
|
inline: PropTypes.bool,
|
||||||
tiny: PropTypes.bool,
|
images: PropTypes.object.isRequired,
|
||||||
images: PropTypes.object.isRequired
|
padded: PropTypes.bool,
|
||||||
|
tiny: PropTypes.bool
|
||||||
}
|
}
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
@ -75,7 +77,7 @@ class IdentityIcon extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
iconsrc: api.util.createIdentityImg(_address, scale)
|
iconsrc: createIdentityImg(_address, scale)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,16 +107,20 @@ class IdentityIcon extends Component {
|
|||||||
return (
|
return (
|
||||||
<ContractIcon
|
<ContractIcon
|
||||||
className={ classes }
|
className={ classes }
|
||||||
style={ { width: size, height: size, background: '#eee' } } />
|
style={ {
|
||||||
|
width: size,
|
||||||
|
height: size,
|
||||||
|
background: '#eee'
|
||||||
|
} } />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
className={ classes }
|
className={ classes }
|
||||||
src={ iconsrc }
|
height={ size }
|
||||||
width={ size }
|
width={ size }
|
||||||
height={ size } />
|
src={ iconsrc } />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user