Open vre2h opened 3 years ago
https://github.com/fe-bootcamp-2021/bookstore/blob/050a5d581d031e4e6d7fba63c5d3bb8f89f06697/src/components/Slider/Slider.js#L8
Plz consider refactoring this:
const img = [ <img alt="" key={slide1} src={slide1} width="100%" object-fit="cover"></img>, <img alt="" key={slide2} src={slide2} width="100%" object-fit="cover"></img>, <img alt="" key={slide3} src={slide3} width="100%" object-fit="cover"></img>, ];
to this
const images = [ {src: slide1}, {src: slide2}, {src: slide3}, ] ... return images.map(({src}) => <img src={src} />)
https://github.com/fe-bootcamp-2021/bookstore/blob/050a5d581d031e4e6d7fba63c5d3bb8f89f06697/src/components/Slider/Slider.js#L8
Plz consider refactoring this:
to this