Skip to content

Commit

Permalink
fix: button display
Browse files Browse the repository at this point in the history
  • Loading branch information
mhaack committed Oct 27, 2023
1 parent c9aea81 commit 7f3f7bd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions blocks/ordering-options/ordering-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,14 @@ function showHideStoreFeature(showStore, orderBlock, heroBlock) {
if (heroOrder && heroBlock.querySelector('img')) heroOrder = undefined;
if (showStore) {
orderBlock.classList.remove(STORE_HIDDEN_CLASS);
if (heroOrder) heroOrder.classList.remove(STORE_HIDDEN_CLASS);
// hide buttons in hero and instead show option form
if (heroBlock) {
heroBlock.querySelectorAll('.button-container').forEach((buttonContainer) => {
buttonContainer.remove();
});
if (heroOrder) {
heroOrder.classList.remove(STORE_HIDDEN_CLASS);
// hide buttons in hero and instead show option form
if (heroBlock) {
heroBlock.querySelectorAll('.button-container').forEach((buttonContainer) => {
buttonContainer.remove();
});
}
}
} else {
orderBlock.classList.add(STORE_HIDDEN_CLASS);
Expand Down

0 comments on commit 7f3f7bd

Please sign in to comment.