diff --git a/checkout/src/arquivos/js/checkout.js b/checkout/src/arquivos/js/checkout.js index 063678e..c8162e9 100644 --- a/checkout/src/arquivos/js/checkout.js +++ b/checkout/src/arquivos/js/checkout.js @@ -2,12 +2,11 @@ import CheckoutUI from "./components/CheckoutUI"; import { Container } from "m3-utils"; import "slick-carousel"; import Header from "./components/Header"; -import Body from "./components/Body"; import Footer from "./components/Footer"; const m3Checkout = new Container({ appName: "m3-checkout", - components: [CheckoutUI, Header, Body, Footer], + components: [CheckoutUI, Header, Footer], }); m3Checkout.start(); diff --git a/checkout/src/arquivos/js/components/Body.js b/checkout/src/arquivos/js/components/Body.js deleted file mode 100644 index 4378375..0000000 --- a/checkout/src/arquivos/js/components/Body.js +++ /dev/null @@ -1,16 +0,0 @@ -export default class Body { - constructor() { - this.init(); - } - - async init() { - await this.selectors(); - } - async selectors() { - this.titleCart = await waitElement(".empty-cart-title"); - } - - trocaTitle() { - this.titleCart.innerHTML = ``; - } -} diff --git a/checkout/src/arquivos/js/components/Footer.js b/checkout/src/arquivos/js/components/Footer.js index 00b47af..255832f 100644 --- a/checkout/src/arquivos/js/components/Footer.js +++ b/checkout/src/arquivos/js/components/Footer.js @@ -14,6 +14,7 @@ export default class Footer { await this.renderIconCreditCards(); await this.renderIconVtexPci(); await this.renderIconsDeveloped(); + this.trocaTitle(); } async selectors() { @@ -23,6 +24,9 @@ export default class Footer { this.footerIconsCreditCards = await waitElement(".footerCheckout__payments"); this.footerIconVtexPci = await waitElement(".footerCheckout__vtexpci"); this.footerIconsDeveloped = await waitElement(".footerCheckout__developedBy"); + this.titleCart = await waitElement(".empty-cart-title"); + this.subTitleCart = await waitElement(".empty-cart-message"); + this.buttonCart = await waitElement("#cart-choose-products"); } onUpdate() { @@ -83,4 +87,11 @@ export default class Footer {
  • Powered By
  • Developed By
  • `; } + + trocaTitle() { + const tituloCart = document.querySelector(".empty-cart-title"); + tituloCart.innerHTML = `

    SEU CARRINHO ESTÁ VAZIO

    `; + this.subTitleCart.innerHTML = `

    `; + this.buttonCart.innerHTML = `Continuar comprando`; + } } diff --git a/checkout/src/arquivos/sass/checkout.scss b/checkout/src/arquivos/sass/checkout.scss index 9ca7fc6..771070c 100644 --- a/checkout/src/arquivos/sass/checkout.scss +++ b/checkout/src/arquivos/sass/checkout.scss @@ -1,6 +1,5 @@ @import "./utils/all"; @import "./lib/slick"; @import "./partials/header"; -@import "./partials/body"; @import "./partials/footer"; @import "./checkout/checkout.scss"; diff --git a/checkout/src/arquivos/sass/partials/_body.scss b/checkout/src/arquivos/sass/partials/_body.scss deleted file mode 100644 index 70e1b3f..0000000 --- a/checkout/src/arquivos/sass/partials/_body.scss +++ /dev/null @@ -1,11 +0,0 @@ -/*#checkoutMainContainer { - width: 100%; - transform: translateY(-50%); - height: 1px; - border-bottom: 1px solid #000000; -}*/ -.container-cart { - #cart-title { - display: none !important; - } -} diff --git a/checkout/src/arquivos/sass/partials/_footer.scss b/checkout/src/arquivos/sass/partials/_footer.scss index 2e4d3be..579e12b 100644 --- a/checkout/src/arquivos/sass/partials/_footer.scss +++ b/checkout/src/arquivos/sass/partials/_footer.scss @@ -99,3 +99,8 @@ } } } +.container-cart { + #cart-title { + display: none !important; + } +}