diff --git a/src/app/page.tsx b/src/app/page.tsx index abb9ea4..430447f 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,59 +2,15 @@ import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import HeroSplitDoubleCarousel from "@/components/sections/hero/HeroSplitDoubleCarousel"; -import FeatureCardSixteen from "@/components/sections/feature/FeatureCardSixteen"; -import TestimonialCardSixteen from "@/components/sections/testimonial/TestimonialCardSixteen"; import ProductCardFour from "@/components/sections/product/ProductCardFour"; -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, X, ChevronRight, Play, Instagram, MapPin, User } from "lucide-react"; +import { Phone, Instagram, MapPin, X } from "lucide-react"; import { useState, useEffect, useRef } from "react"; export default function LandingPage() { const [showModal, setShowModal] = useState(false); - const [showBackToTop, setShowBackToTop] = useState(false); - const [showGalleryViewMore, setShowGalleryViewMore] = useState(false); - const [showShoesViewMore, setShowShoesViewMore] = useState(false); - const [showVeilsViewMore, setShowVeilsViewMore] = useState(false); - const [modalType, setModalType] = useState<'gallery' | 'shoes' | 'veils' | null>(null); - const [lastScrollY, setLastScrollY] = useState(0); + const [modalType, setModalType] = useState<'gallery' | null>(null); const galleryRef = useRef(null); - const shoesRef = useRef(null); - const veilsRef = useRef(null); - const galleryButtonContainerRef = useRef(null); - const shoesButtonContainerRef = useRef(null); - const veilsButtonContainerRef = useRef(null); - - useEffect(() => { - let ticking = false; - const handleScroll = () => { - if (!ticking && !showModal) { - window.requestAnimationFrame(() => { - const currentScrollY = window.scrollY; - setShowBackToTop(currentScrollY > 300); - if (galleryButtonContainerRef.current) { - const rect = galleryButtonContainerRef.current.getBoundingClientRect(); - setShowGalleryViewMore(rect.top < window.innerHeight && rect.bottom > 0); - } - if (shoesButtonContainerRef.current) { - const rect = shoesButtonContainerRef.current.getBoundingClientRect(); - setShowShoesViewMore(rect.top < window.innerHeight && rect.bottom > 0); - } - if (veilsButtonContainerRef.current) { - const rect = veilsButtonContainerRef.current.getBoundingClientRect(); - setShowVeilsViewMore(rect.top < window.innerHeight && rect.bottom > 0); - } - setLastScrollY(currentScrollY); - ticking = false; - }); - ticking = true; - } - }; - window.addEventListener('scroll', handleScroll); - return () => window.removeEventListener('scroll', handleScroll); - }, [lastScrollY, showModal]); const allDresses = [ { id: "dress-1", name: "Classic Elegance", price: "Starting at $1,200", variant: "White", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B5MJh3BJx339lVFA4KYjFzlzMX/uploaded-1773897612811-03t85tl3.jpg?_wi=1", imageAlt: "Elegant white wedding dress" }, @@ -65,14 +21,13 @@ export default function LandingPage() { const renderModal = () => { if (!showModal || !modalType) return null; - let items = modalType === 'gallery' ? allDresses : []; return (

Dress Details

- {items.map((item) => ( + {allDresses.map((item) => ( {item.imageAlt} ))}
@@ -126,14 +81,17 @@ export default function LandingPage() { } }))} /> -
{renderModal()} ); -} +} \ No newline at end of file