Skip to content

Commit

Permalink
LYNX-759: handle authenticated event to hide Targeted Block(s) which …
Browse files Browse the repository at this point in the history
…does not apply anymore
  • Loading branch information
bl4de committed Feb 14, 2025
1 parent 5d3444c commit 5512110
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions blocks/targeted-block/targeted-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ export default function decorate(block) {
block.setAttribute('data-targeted-block-key', blocks.length - 1);
}

events.on('authenticated', () => {
updateTargetedBlocksVisibility();
}, { eager: true });

events.on('cart/initialized', () => {
updateTargetedBlocksVisibility();
}, { eager: true });
Expand Down

0 comments on commit 5512110

Please sign in to comment.