diff --git a/blocks/commerce-cart/commerce-cart.js b/blocks/commerce-cart/commerce-cart.js index 9c6fc6792a..66ae0aaad8 100644 --- a/blocks/commerce-cart/commerce-cart.js +++ b/blocks/commerce-cart/commerce-cart.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-unresolved */ /* eslint-disable import/no-extraneous-dependencies */ // Drop-in Tools diff --git a/blocks/commerce-order-confirmation/commerce-order-confirmation.js b/blocks/commerce-order-confirmation/commerce-order-confirmation.js index baae8b8b2b..57e6cc792d 100644 --- a/blocks/commerce-order-confirmation/commerce-order-confirmation.js +++ b/blocks/commerce-order-confirmation/commerce-order-confirmation.js @@ -17,6 +17,7 @@ export default async function decorate(block) { orderConfirmationRenderer.render(OrderConfirmation, { orderRef, + // eslint-disable-next-line no-console onContinueShopping: () => console.log('continue shopping'), })(block); } diff --git a/blocks/header/header.css b/blocks/header/header.css index 2d992e3d7c..98b2947d9a 100644 --- a/blocks/header/header.css +++ b/blocks/header/header.css @@ -331,7 +331,7 @@ header .minicart-panel { display: none; } -header .minicart-panel--visible { +header .minicart-panel-visible { display: block; } diff --git a/blocks/header/header.js b/blocks/header/header.js index cbc3ed0e44..3778456bd5 100644 --- a/blocks/header/header.js +++ b/blocks/header/header.js @@ -1,3 +1,5 @@ +/* eslint-disable import/no-unresolved */ + import { events } from '@dropins/elsie/event-bus.js'; import { getMetadata } from '../../scripts/aem.js'; import { loadFragment } from '../fragment/fragment.js'; @@ -140,12 +142,12 @@ export default async function decorate(block) { navTools.append(minicartButton); - // TODO: Toggle Mini Cart - Mini Cart Drop-in is not yet available, go to Cart page instead. + // TODO: Toggle Mini Cart; Mini Cart Drop-in is not yet available, go to Cart page instead. // const minicartPanel = navTools.querySelector('.minicart-panel'); // let cartVisible = false; navTools.querySelector('.nav-cart-button').addEventListener('click', async () => { // cartVisible = !cartVisible; - // minicartPanel.classList.toggle('minicart-panel--visible', cartVisible); + // minicartPanel.classList.toggle('minicart-panel-visible', cartVisible); window.location.href = '/cart'; }); diff --git a/blocks/product-details-custom/Icon.js b/blocks/product-details-custom/Icon.js deleted file mode 100644 index 4506b6a18c..0000000000 --- a/blocks/product-details-custom/Icon.js +++ /dev/null @@ -1,43 +0,0 @@ -import { - h, Component, Fragment, - // eslint-disable-next-line import/no-unresolved,import/extensions -} from '../../scripts/preact.js'; -// eslint-disable-next-line import/no-unresolved,import/extensions -import htm from '../../scripts/htm.js'; - -const html = htm.bind(h); - -export default class Icon extends Component { - constructor(props) { - super(); - - this.iconName = props.name; - } - - async componentDidMount() { - const resp = await fetch(`${window.hlx.codeBasePath}/icons/${this.iconName}.svg`); - if (resp.ok) { - const iconHTML = await resp.text(); - this.setState({ iconHTML }); - } - } - - render() { - if (!this.state.iconHTML) { - return null; - } - - if (this.state.iconHTML.match(/