diff --git a/src/app/(marketing)/page.tsx b/src/app/(marketing)/page.tsx index 063b727..ee2f5a7 100644 --- a/src/app/(marketing)/page.tsx +++ b/src/app/(marketing)/page.tsx @@ -1,5 +1,6 @@ import { LandingFeaturesSection2 } from "@/components/landing/LandingFeatureSection2"; import { LandingFeaturesSection1 } from "@/components/landing/LandingFeaturesSection1"; +import { LandingFullPageWrapper } from "@/components/landing/LandingFullPageWrapper"; import { LandingHeroSection } from "@/components/landing/LandingHeroSection"; import { LandingSpecialFeaturesSection } from "@/components/landing/LandingSpecialFeaturesSection"; @@ -7,11 +8,14 @@ export const revalidate = 21600; export default function Home() { return ( - <> - - - - - + + + + + + + + + ); } diff --git a/src/components/landing/LandingFeatureSection2.tsx b/src/components/landing/LandingFeatureSection2.tsx index 7f07957..47f56ee 100644 --- a/src/components/landing/LandingFeatureSection2.tsx +++ b/src/components/landing/LandingFeatureSection2.tsx @@ -2,17 +2,25 @@ import { LandingFeatureText } from "@/components/landing/LandingFeatureText"; import { LandingLayoutPreview } from "@/components/landing/LandingLayoutPreview"; +import { useInView } from "@/hooks/useInView"; import { cn } from "@/lib/utils"; import type { LandingFeaturesSection2Props } from "@/types/landing"; export function LandingFeaturesSection2({ className }: LandingFeaturesSection2Props) { + const { ref, isInView } = useInView({ + threshold: 0.5, + once: false, + }); return (
diff --git a/src/components/landing/LandingFeaturesSection1.tsx b/src/components/landing/LandingFeaturesSection1.tsx index dead725..354a8e0 100644 --- a/src/components/landing/LandingFeaturesSection1.tsx +++ b/src/components/landing/LandingFeaturesSection1.tsx @@ -1,6 +1,7 @@ "use client"; import { LandingFeatureGrid } from "@/components/landing/LandingFeatureGrid"; +import { useInView } from "@/hooks/useInView"; import { cn } from "@/lib/utils"; import { useFeaturePreviewStore } from "@/stores/featurePreviewStore"; import type { LandingFeaturesSection1Props } from "@/types/landing"; @@ -8,14 +9,21 @@ import Image from "next/image"; export function LandingFeaturesSection1({ className }: LandingFeaturesSection1Props) { const activeFeature = useFeaturePreviewStore((state) => state.activeFeature); + const { ref, isInView } = useInView({ + threshold: 0.5, + once: false, + }); return (
diff --git a/src/components/landing/LandingFullPageWrapper.tsx b/src/components/landing/LandingFullPageWrapper.tsx new file mode 100644 index 0000000..358ad34 --- /dev/null +++ b/src/components/landing/LandingFullPageWrapper.tsx @@ -0,0 +1,9 @@ +"use client"; + +import { useFullPageScroll } from "@/hooks/useFullPageScroll"; +import type { LandingFullPageWrapperProps } from "@/types/landing"; + +export function LandingFullPageWrapper({ children }: LandingFullPageWrapperProps) { + useFullPageScroll(); + return <>{children}; +} diff --git a/src/components/landing/LandingHeroCtas.tsx b/src/components/landing/LandingHeroCtas.tsx index 9401c78..7754e8b 100644 --- a/src/components/landing/LandingHeroCtas.tsx +++ b/src/components/landing/LandingHeroCtas.tsx @@ -7,7 +7,7 @@ export function LandingHeroCtas() { return (
-