diff --git a/checkout/src/arquivos/js/components/Footer.js b/checkout/src/arquivos/js/components/Footer.js
index 30daaa8..d96dc03 100644
--- a/checkout/src/arquivos/js/components/Footer.js
+++ b/checkout/src/arquivos/js/components/Footer.js
@@ -8,22 +8,22 @@ export default class Footer {
async init() {
await this.selectors();
- this.createPaymentsIcons();
- this.createVtexpciIcon();
- this.createDevIcons();
- this.onUpdate();
+ this.Icons();
+ this.vtexIcons();
+ this.devIcons();
+ this.update();
this.events();
}
events() {
window.addEventListener("hashchange", () => {
- this.onUpdate();
- if (window.location.hash == "#/cart" && this.checkoutVazio.style.display == "none") {
- this.listaPrateleira.style.display = "flex";
+ this.update();
+ if (window.location.hash == "#/cart" && this.cktVazio.style.display == "none") {
+ this.prateleira.style.display = "flex";
this.titleSlick.style.display = "block";
}
if (window.location.hash != "#/cart") {
- this.listaPrateleira.style.display = "none";
+ this.prateleira.style.display = "none";
this.titleSlick.style.display = "none";
}
});
@@ -33,36 +33,36 @@ export default class Footer {
}
async selectors() {
- this.checkoutVazio = await waitElement(".empty-cart-content");
- this.checkoutAtivo = await waitElement(".checkout-container");
+ this.cktVazio = await waitElement(".empty-cart-content");
+ this.cktAtivo = await waitElement(".checkout-container");
this.payments = await waitElement(".footerCheckout__payments");
this.vtexpci = await waitElement(".footerCheckout__vtexpci");
- this.devIncons = await waitElement(".footerCheckout__developedBy");
- this.listaPrateleira = await waitElement(".footerCheckout__prateleira");
- this.titulo = await waitElement(".transactions-container");
- this.cartTitulo = await waitElement("#cart-title");
+ this.iconsDev = await waitElement(".footerCheckout__developedBy");
+ this.prateleira = await waitElement(".footerCheckout__prateleira");
+ this.title = await waitElement(".transactions-container");
+ this.carttitle = await waitElement("#cart-title");
this.titleSlick = await waitElement(".transactions-container");
}
- onUpdate() {
- let target = this.checkoutVazio;
- let list = this.listaPrateleira;
- let cartTitle = this.cartTitulo;
+ update() {
+ let target = this.cktVazio;
+ let list = this.prateleira;
+ let cartTitle = this.carttitle;
let slickTitle = this.titleSlick;
if (target.style.display == "none" && window.location.hash == "#/cart") {
list.style.display = "flex";
list.style.display = "block";
- if (!this.listaPrateleira.classList.contains("fetch")) {
+ if (!this.prateleira.classList.contains("fetch")) {
this.fetchApi();
}
} else {
- this.cartTitulo.style.display = "none";
+ this.carttitle.style.display = "none";
list.style.display = "none";
}
let config = { childList: true, attributes: true };
let observer = new MutationObserver((mutations) => {
- if (!this.listaPrateleira.classList.contains("fetch")) {
+ if (!this.prateleira.classList.contains("fetch")) {
this.fetchApi();
}
mutations.forEach(function (mutation) {
@@ -106,7 +106,7 @@ export default class Footer {
}
}
- createPaymentsIcons() {
+ Icons() {
this.payments.innerHTML = `
-
@@ -169,7 +169,7 @@ export default class Footer {
`;
}
- createVtexpciIcon() {
+ vtexIcons() {
this.vtexpci.innerHTML = `