feat(checkout vazio): Muda texto botão

This commit is contained in:
Sabrina Miranda 2022-12-16 15:45:07 -03:00
parent 242fa3ec7f
commit a5030d653b

View File

@ -7,9 +7,10 @@ export default class Footer {
async init() {
await this.selectors();
this.PaymentsIconsHTML();
this.VtexPciIconHTML();
this.paymentsIconsHTML();
this.vtexPciIconHTML();
this.developedByLogoHTML();
this.temptyCartTextBtn();
// this.onUpdate();
}
@ -20,9 +21,10 @@ export default class Footer {
this.payments = await waitElement(".footerCheckout__payments");
this.vtexPCI = await waitElement(".footerCheckout__vtexpci");
this.developedBy = await waitElement(".footerCheckout__developedBy");
this.textBtn = await waitElement("#cart-choose-products");
}
PaymentsIconsHTML() {
paymentsIconsHTML() {
if (this.payments) {
this.payments.innerHTML = `
<picture class="payments-icons">
@ -38,7 +40,7 @@ export default class Footer {
}
}
VtexPciIconHTML() {
vtexPciIconHTML() {
if (this.vtexPCI) {
this.vtexPCI.innerHTML = `
<picture class="vtexpci-icon">
@ -72,6 +74,12 @@ export default class Footer {
}
}
temptyCartTextBtn() {
if (this.textBtn) {
this.textBtn.textContent = "Continuar comprando";
}
}
onUpdate() {
//Função qeu fará a verificação se o carrinho está vazio para remover a prateleira de produtos:
// vocês devem olhar a doc fornecida no Desafio para aprender a usar a MutationObserver