MCPcopy Create free account
hub / github.com/code100x/daily-code / handleScroll

Function handleScroll

apps/web/components/BlogAppbar.tsx:71–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 }, 90);
70
71 const handleScroll = () => {
72 if (typeof window !== "undefined") {
73 const currentScrollY = window.scrollY;
74 if (currentScrollY > lastScrollY && currentScrollY > 100) {
75 // Scrolling down
76 setVisible(false);
77 setIsOpen(false);
78 } else {
79 // Scrolling up
80 setVisible(true);
81 }
82 setLastScrollY(currentScrollY);
83 }
84 };
85
86 const renderTopics = () => {
87 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected