From e812a41272306f5fd3315914dde89acf48689320 Mon Sep 17 00:00:00 2001 From: bender Date: Sat, 21 Mar 2026 22:51:57 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 199 +++++++++++++++++++++++++++++++---------------- 1 file changed, 133 insertions(+), 66 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 1d7daf1..d06151a 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -17,12 +17,15 @@ export default function LandingPage() { const [showBackToTop, setShowBackToTop] = useState(false); const [showViewMoreButton, setShowViewMoreButton] = useState(false); const [showShoesArrow, setShowShoesArrow] = useState(false); + const [showShoesMoreButton, setShowShoesMoreButton] = useState(false); + const [showVeilsMoreButton, setShowVeilsMoreButton] = 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); + const veilsRef = useRef(null); useEffect(() => { let ticking = false; @@ -67,9 +70,27 @@ export default function LandingPage() { if (!shoesInView && currentScrollY > lastScrollY) { // We've scrolled past the shoes section, show the up arrow setShowShoesArrow(true); + setShowShoesMoreButton(true); } else if (shoesInView) { // We're at or above the shoes section setShowShoesArrow(false); + setShowShoesMoreButton(false); + } + } + + // Check if veils section is in view for more button + if (veilsRef.current) { + const veilsRect = veilsRef.current.getBoundingClientRect(); + const veilsInView = veilsRect.top < window.innerHeight && veilsRect.bottom > 0; + + // Show more button when scrolled past veils section + // Hide when user scrolls back to veils area + if (!veilsInView && currentScrollY > lastScrollY) { + // We've scrolled past the veils section, show the more button + setShowVeilsMoreButton(true); + } else if (veilsInView && currentScrollY < lastScrollY) { + // We're back at or above the veils section, hide the button + setShowVeilsMoreButton(false); } } @@ -103,6 +124,16 @@ export default function LandingPage() { } }; + const scrollToVeils = () => { + const veilsSectionElement = document.getElementById('veils'); + if (veilsSectionElement) { + veilsSectionElement.scrollIntoView({ + behavior: 'smooth', + block: 'start' + }); + } + }; + const scrollToTop = () => { const heroSectionElement = document.getElementById('hero'); if (heroSectionElement) { @@ -600,74 +631,110 @@ export default function LandingPage() {
- +
+ + + {/* More Button for Shoes - Positioned after shoes section */} +
+ {showShoesMoreButton && ( +
+ +
+ )} +
+
-
- +
+
+ + + {/* More Button for Veils - Positioned after veils section */} +
+ {showVeilsMoreButton && ( +
+ +
+ )} +
+
-- 2.49.1