fix: restore full landing page with FeaturesAndStats and TestimonialsAndCTA
This commit is contained in:
@@ -1,7 +1,69 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useRef } from "react";
|
||||
import HeroSection from "@/components/landing/HeroSection";
|
||||
import FeaturesAndStats from "@/components/landing/FeaturesAndStats";
|
||||
import TestimonialsAndCTA from "@/components/landing/TestimonialsAndCTA";
|
||||
import { gsap } from "gsap";
|
||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||
|
||||
// Register GSAP plugins
|
||||
if (typeof window !== "undefined") {
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
}
|
||||
|
||||
export default function LandingPageClient() {
|
||||
return <HeroSection />;
|
||||
const mainRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
// Global scroll animations
|
||||
useEffect(() => {
|
||||
if (typeof window === "undefined" || !mainRef.current) return;
|
||||
|
||||
const ctx = gsap.context(() => {
|
||||
// Parallax sections
|
||||
const parallaxElements = gsap.utils.toArray<Element>(".parallax-section");
|
||||
parallaxElements.forEach((el) => {
|
||||
gsap.to(el, {
|
||||
y: -50,
|
||||
ease: "none",
|
||||
scrollTrigger: {
|
||||
trigger: el,
|
||||
start: "top bottom",
|
||||
end: "bottom top",
|
||||
scrub: 1,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
// Reveal animations for sections
|
||||
const revealElements = gsap.utils.toArray<Element>(".scroll-reveal");
|
||||
revealElements.forEach((el) => {
|
||||
gsap.fromTo(
|
||||
el,
|
||||
{ opacity: 0, y: 60 },
|
||||
{
|
||||
opacity: 1,
|
||||
y: 0,
|
||||
duration: 1,
|
||||
ease: "power3.out",
|
||||
scrollTrigger: {
|
||||
trigger: el,
|
||||
start: "top 85%",
|
||||
toggleActions: "play none none reverse",
|
||||
},
|
||||
}
|
||||
);
|
||||
});
|
||||
}, mainRef);
|
||||
|
||||
return () => ctx.revert();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div ref={mainRef}>
|
||||
<HeroSection />
|
||||
<FeaturesAndStats />
|
||||
<TestimonialsAndCTA />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -5,12 +5,14 @@ import Link from "next/link";
|
||||
import { motion, useInView, AnimatePresence } from "framer-motion";
|
||||
import { useCart } from "@/context/CartContext";
|
||||
import TuxedoVideoHero from "@/components/storefront/TuxedoVideoHero";
|
||||
import CinematicShowcase from "@/components/storefront/CinematicShowcase";
|
||||
import LayoutContainer from "@/components/layout/LayoutContainer";
|
||||
import ProductCard from "@/components/storefront/ProductCard";
|
||||
import PaginatedStops from "@/components/storefront/PaginatedStops";
|
||||
import StorefrontHeader from "@/components/storefront/StorefrontHeader";
|
||||
import StorefrontFooter from "@/components/storefront/StorefrontFooter";
|
||||
import BrandStylesProvider from "@/components/storefront/BrandStylesProvider";
|
||||
import { ScrollReveal, ParallaxLayer, FadeOnScroll } from "@/components/ui/ScrollAnimations";
|
||||
import { supabase } from "@/lib/supabase";
|
||||
import { getBrandSettingsPublic } from "@/actions/brand-settings";
|
||||
import { gsap } from "gsap";
|
||||
|
||||
Reference in New Issue
Block a user