diff --git a/checkout/src/arquivos/js/components/Footer.js b/checkout/src/arquivos/js/components/Footer.js index 1247c4b..77e3b2d 100644 --- a/checkout/src/arquivos/js/components/Footer.js +++ b/checkout/src/arquivos/js/components/Footer.js @@ -14,8 +14,14 @@ 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(); + } + this.prateleiraView(); + } async selectors() { @@ -29,6 +35,7 @@ export default class Footer { timeout: 5000, interval: 1000, }); + this.pratWrapper = await waitElement(".footerCheckout") } onUpdate() { @@ -54,8 +61,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 = `