From 0636e0dc0c75b0cc53e7172d2a44b2214c4ff9a5 Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 19 Mar 2026 05:52:24 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 71 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 13 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index f33ff82..3ee69b4 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -10,11 +10,41 @@ import ContactCTA from "@/components/sections/contact/ContactCTA"; import FooterSimple from "@/components/sections/footer/FooterSimple"; import TestimonialAboutCard from "@/components/sections/about/TestimonialAboutCard"; import BlogCardThree from "@/components/sections/blog/BlogCardThree"; -import { Star, Heart, Users, Camera, Sparkles, Crown, Phone, MessageCircle, User, Play, ChevronRight, X, ArrowDown } from "lucide-react"; -import { useState } from "react"; +import { Star, Heart, Users, Camera, Sparkles, Crown, Phone, MessageCircle, User, Play, ChevronRight, X, ArrowDown, ArrowUp } from "lucide-react"; +import { useState, useEffect } from "react"; export default function LandingPage() { const [showModal, setShowModal] = useState(false); + const [showBackToTop, setShowBackToTop] = useState(false); + + useEffect(() => { + const handleScroll = () => { + setShowBackToTop(window.scrollY > 300); + }; + + window.addEventListener('scroll', handleScroll); + return () => window.removeEventListener('scroll', handleScroll); + }, []); + + const scrollToGallery = () => { + const gallerySectionElement = document.getElementById('gallery'); + if (gallerySectionElement) { + gallerySectionElement.scrollIntoView({ + behavior: 'smooth', + block: 'start' + }); + } + }; + + const scrollToTop = () => { + const heroSectionElement = document.getElementById('hero'); + if (heroSectionElement) { + heroSectionElement.scrollIntoView({ + behavior: 'smooth', + block: 'start' + }); + } + }; const allDresses = [ { @@ -96,16 +126,6 @@ export default function LandingPage() { const initialDresses = allDresses.slice(0, 6); - const handleScrollToDresses = () => { - const gallerySectionElement = document.getElementById('gallery'); - if (gallerySectionElement) { - gallerySectionElement.scrollIntoView({ - behavior: 'smooth', - block: 'start' - }); - } - }; - return ( + {/* Fixed "Go to Dresses" Button */} + + + {/* Fixed Back-to-Top Button */} + {showBackToTop && ( + + )} +