Make props not mandatory

pull/8/head
Vasek Mlejnsky 6 years ago
parent 47f96d7128
commit 85df75c8c5

@ -27,7 +27,7 @@ const CoinLogo = ({
return (
<Logo
className={className}
coinImg={coinImg || coinImgUrl}
coinImg={coinImgName ? coinImgUrl : coinImg}
/>
);
};
@ -35,7 +35,7 @@ const CoinLogo = ({
CoinLogo.propTypes = {
className: PropTypes.string,
coinImg: PropTypes.string,
coinNetwork: PropTypes.string.isRequired,
coinNetwork: PropTypes.string,
};
export default CoinLogo;

@ -28,7 +28,7 @@ P.propTypes = {
children: PropTypes.oneOfType([
PropTypes.array,
PropTypes.string,
]).isRequired,
]),
};
export default P;

@ -83,7 +83,7 @@ const iconShape = {
RowCoin.propTypes = {
coin: PropTypes.shape({
name: PropTypes.string.isRequired,
network: PropTypes.string.isRequired,
network: PropTypes.string,
img: PropTypes.string,
}).isRequired,
iconLeft: PropTypes.shape(iconShape),

Loading…
Cancel
Save