1 const [scroll, setScroll] = useState(0)
2
3 useEffect(() => {
4 document.addEventListener("scroll", () => {
5 const scrollCheck = window.scrollY < 100
6 if (scrollCheck !== scroll) {
7 setScroll(scrollCheck)
8 }
9 })
10 })