()
| 15 | useEffect(() => { |
| 16 | smoothscroll.polyfill(); // Apply smoothscroll polyfill for older browsers |
| 17 | const handleScroll = () => { |
| 18 | let height = 580; |
| 19 | const scrollCheck = |
| 20 | document.documentElement.scrollTop || |
| 21 | document.body.scrollTop; |
| 22 | if (scrollCheck > height) { |
| 23 | setScroll(true); |
| 24 | } else { |
| 25 | setScroll(false); |
| 26 | } |
| 27 | }; |
| 28 | window.addEventListener("scroll", handleScroll); |
| 29 | return () => { |
| 30 | window.removeEventListener("scroll", handleScroll); |
nothing calls this directly
no outgoing calls
no test coverage detected