diff --git a/solutions/script-component-strategies/pages/index.tsx b/solutions/script-component-strategies/pages/index.tsx index cfc07c271..058aba2b7 100644 --- a/solutions/script-component-strategies/pages/index.tsx +++ b/solutions/script-component-strategies/pages/index.tsx @@ -59,20 +59,6 @@ function Home() {
-
- beforeInteractive examples - -
  • - Polyfill: Demo -{' '} - - Code - -
  • -
    -
    - -
    -
    afterInteractive examples diff --git a/solutions/script-component-strategies/pages/polyfill.tsx b/solutions/script-component-strategies/pages/polyfill.tsx deleted file mode 100644 index c2c248645..000000000 --- a/solutions/script-component-strategies/pages/polyfill.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { useEffect, useRef, useState } from 'react' -import Script from 'next/script' -import { Layout, Page, Text } from '@vercel/examples-ui' - -function Polyfill() { - const ref = useRef(null) - const [lastIntersection, setIntersection] = useState(new Date()) - - useEffect(() => { - const observer = new IntersectionObserver( - (intersections) => { - const isIntersecting = intersections[0]?.isIntersecting - - if (isIntersecting) { - setIntersection(new Date()) - } - }, - { - rootMargin: '45px', - } - ) - - if (ref.current) { - observer.observe(ref.current) - } - - return () => observer.disconnect() - }, []) - - return ( - <> - {/* We ensure that intersection observer is available by polyfilling it */} -