diff --git a/src/components/RevealOnScroll.jsx b/src/components/RevealOnScroll.jsx index 6257bdc..050425f 100644 --- a/src/components/RevealOnScroll.jsx +++ b/src/components/RevealOnScroll.jsx @@ -5,9 +5,17 @@ function RevealOnScroll({ children }) { useEffect(() => { const isSmallScreen = window.innerWidth < 1080; + if (isSmallScreen) { + // Directly show content without animation on small screens. + if (ref.current) { + ref.current.classList.add("visible"); + } + return; + } + const observerOptions = { threshold: 0.2, - rootMargin: isSmallScreen ? "0px" : "0px 0px -50px 0px" + rootMargin: "0px 0px -50px 0px", }; const observer = new IntersectionObserver(([entry]) => {