Skip to content

Commit

Permalink
cr rename ctas
Browse files Browse the repository at this point in the history
  • Loading branch information
meganthecoder committed Apr 10, 2024
1 parent 5c13efe commit 17b1c3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/blocks/icon-block/icon-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ function decorateContent(el) {
if (secondColumn.children.length === 1) el.classList.add('items-center');
el.querySelector('.foreground .text-content').append(secondColumn);
}
const ctas = el.querySelectorAll('.action-area');
if (ctas.length) {
const actionAreas = el.querySelectorAll('.action-area');
if (actionAreas.length) {
const div = createTag('div', { class: 'cta-container' });
const lastCta = ctas[ctas.length - 1];
const secondLastCta = ctas[ctas.length - 2];
const lastCta = actionAreas[actionAreas.length - 1];
const secondLastCta = actionAreas[actionAreas.length - 2];
lastCta.insertAdjacentElement('afterend', div);
if (secondLastCta && lastCta.previousElementSibling === secondLastCta) {
div.append(secondLastCta);
Expand Down

0 comments on commit 17b1c3a

Please sign in to comment.