diff --git a/checkout/src/arquivos/js/components/Footer.js b/checkout/src/arquivos/js/components/Footer.js index 1247c4b..fea78ed 100644 --- a/checkout/src/arquivos/js/components/Footer.js +++ b/checkout/src/arquivos/js/components/Footer.js @@ -14,8 +14,13 @@ export default class Footer { this.createShelf(); this.shelfList = await waitElement(".footerCheckout__shelfList"); this.shelfItens(); - // await this.shelfUpdate(); - this.addCarrossel(); + if (window.innerWidth > 1024){ + this.addCarrossel(); + } + if (window.innerWidth < 1024){ + this.addCarrosselMobile(); + } + } async selectors() { @@ -54,8 +59,17 @@ export default class Footer { infinite: false, }); } + async addCarrosselMobile() { + const elemento = await waitElement(".footerCheckout__shelfList"); + $(elemento).slick({ + slidesToShow: 3, + slidesToScroll: 1, + arrows: true, + infinite: false, + }); + } addIconVtexAndM3() { - if (this.iconsVtexAndM3 && window.innerWidth > 1024) { + if (this.iconsVtexAndM3) { this.iconsVtexAndM3.innerHTML = `