diff --git a/src/app/page.tsx b/src/app/page.tsx index c060adb..1d7daf1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -16,11 +16,13 @@ export default function LandingPage() { const [showModal, setShowModal] = useState(false); const [showBackToTop, setShowBackToTop] = useState(false); const [showViewMoreButton, setShowViewMoreButton] = useState(false); + const [showShoesArrow, setShowShoesArrow] = useState(false); const [scrollDirection, setScrollDirection] = useState<'up' | 'down'>('down'); const [lastScrollY, setLastScrollY] = useState(0); const viewMoreButtonRef = useRef(null); const sixthItemRef = useRef(null); const galleryRef = useRef(null); + const shoesRef = useRef(null); useEffect(() => { let ticking = false; @@ -55,6 +57,22 @@ export default function LandingPage() { } } + // Check if shoes section is in view for arrow detection + if (shoesRef.current) { + const shoesRect = shoesRef.current.getBoundingClientRect(); + const shoesInView = shoesRect.top < window.innerHeight && shoesRect.bottom > 0; + + // Show up arrow when scrolled past shoes section + // Show down arrow when above shoes section + if (!shoesInView && currentScrollY > lastScrollY) { + // We've scrolled past the shoes section, show the up arrow + setShowShoesArrow(true); + } else if (shoesInView) { + // We're at or above the shoes section + setShowShoesArrow(false); + } + } + ticking = false; }); ticking = true; @@ -282,18 +300,35 @@ export default function LandingPage() { )} - {/* Fixed "Go to Shoes" Button */} - + {/* Fixed "Go to Shoes" Button - With scroll detection */} + {!showShoesArrow && ( + + )} + + {/* Fixed "Back to Shoes" Button - Appears when scrolled past shoes */} + {showShoesArrow && ( + + )} {/* Fixed Top Social & Contact Bar */}
@@ -564,7 +599,7 @@ export default function LandingPage() { />
-
+