mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 12:43:11 +10:00
Remove unused defaultURL
It seems that defaultURL is never used. According to the props, nameSet doesn't have url field, it only has name and size fields. Thus the defaultURL is always null.
This commit is contained in:
parent
5bfa0957c8
commit
13246c44f6
1 changed files with 1 additions and 2 deletions
|
|
@ -61,7 +61,6 @@ const ResponsiveImage = props => {
|
|||
/* eslint-enable jsx-a11y/img-redundant-alt */
|
||||
}
|
||||
|
||||
const defaultURL = nameSet[0].url;
|
||||
const imageSizes = image.attributes.sizes;
|
||||
|
||||
const srcSet = nameSet
|
||||
|
|
@ -73,7 +72,7 @@ const ResponsiveImage = props => {
|
|||
|
||||
const sizesProp = sizes ? { sizes } : {};
|
||||
|
||||
return <img alt={alt} className={classes} src={defaultURL} srcSet={srcSet} {...sizesProp} />;
|
||||
return <img alt={alt} className={classes} srcSet={srcSet} {...sizesProp} />;
|
||||
};
|
||||
|
||||
const { arrayOf, shape, string } = PropTypes;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue