From 94ba880ba84ae008c2544ebb4381f6bf323df330 Mon Sep 17 00:00:00 2001 From: Ritwik Srivastava Date: Tue, 4 Jun 2024 19:51:50 +0530 Subject: [PATCH] Floating agent --- blocks/floatingagent/floatingagent.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/blocks/floatingagent/floatingagent.js b/blocks/floatingagent/floatingagent.js index 766d94ff..ef0d685c 100644 --- a/blocks/floatingagent/floatingagent.js +++ b/blocks/floatingagent/floatingagent.js @@ -57,21 +57,3 @@ export default function decorate(block) { observer.observe(heroElement); } - -const displayedElement = document.querySelector('.floatingagent'); - -const heroElement = document.querySelector('.hero-wrapper'); - -const observer = new IntersectionObserver((entries) => { - entries.forEach((entry) => { - if (entry.isIntersecting) { - displayedElement.style.display = 'none'; - } else { - displayedElement.style.display = 'flex'; - } - }); -}, { - threshold: [0], -}); - -observer.observe(heroElement);