|
1 | 1 | 'use client' |
2 | | -import Bento from '@/components/landing-sections/Bento' |
3 | | -import Brands from '@/components/landing-sections/Brands' |
4 | | -import CTA from '@/components/landing-sections/CTA' |
5 | | -import Footer from '@/components/landing-sections/footer' |
6 | | -import Hero from '@/components/landing-sections/Hero' |
7 | | -import HowItWorks from '@/components/landing-sections/how-it-works' |
8 | | -import Navbar from '@/components/landing-sections/navbar' |
9 | | -import Testimonials from '@/components/landing-sections/testimonials' |
10 | | -import Video from '@/components/landing-sections/video' |
11 | | -import React from 'react' |
12 | | -import { FaqSection } from '@/components/faq/FaqSection' |
| 2 | +import React, { Suspense, lazy } from 'react' |
| 3 | + |
| 4 | +import { Skeleton } from "@/components/ui/skeleton"; |
| 5 | + |
| 6 | +const Navbar = lazy(() => import('@/components/landing-sections/navbar')) |
| 7 | +const Hero = lazy(() => import('@/components/landing-sections/Hero')) |
| 8 | +const Bento = lazy(() => import('@/components/landing-sections/Bento')) |
| 9 | +const Video = lazy(() => import('@/components/landing-sections/video')) |
| 10 | +const HowItWorks = lazy(() => import('@/components/landing-sections/how-it-works')) |
| 11 | +const Brands = lazy(() => import('@/components/landing-sections/Brands')) |
| 12 | +const Testimonials = lazy(() => import('@/components/landing-sections/testimonials')) |
| 13 | +const FaqSection = lazy(() => import('@/components/faq/FaqSection')) |
| 14 | +const CTA = lazy(() => import('@/components/landing-sections/CTA')) |
| 15 | +const Footer = lazy(() => import('@/components/landing-sections/footer')) |
13 | 16 |
|
14 | 17 |
|
15 | 18 | const Landing = () => { |
16 | 19 | return ( |
17 | 20 | <main className='min-h-screen w-full bg-[#101010] text-white font-sans overflow-hidden relative'> |
18 | | - <Navbar /> |
19 | | - <div className="min-h-screen w-full max-w-[2000px] mx-auto border-x border-[#252525] overflow-hidden"> |
20 | | - <Hero /> |
21 | | - <Bento /> |
22 | | - <Video /> |
23 | | - <HowItWorks /> |
24 | | - <FaqSection /> |
25 | | - <Brands /> |
26 | | - <Testimonials /> |
| 21 | + <Suspense |
| 22 | + fallback={ |
| 23 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 24 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 25 | + <Skeleton className="h-6 w-40" /> |
| 26 | + <Skeleton className="h-4 w-72" /> |
| 27 | + <Skeleton className="h-4 w-64" /> |
| 28 | + <Skeleton className="h-4 w-56" /> |
| 29 | + </div> |
| 30 | + </div> |
| 31 | + } |
| 32 | + > |
| 33 | + <Navbar /> |
| 34 | + </Suspense> |
| 35 | + <div className="min-h-screen w-full max-w-[2000px] mx-auto border-x border-[#252525] overflow-hidden"> |
| 36 | + <Suspense |
| 37 | + fallback={ |
| 38 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 39 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 40 | + <Skeleton className="h-6 w-40" /> |
| 41 | + <Skeleton className="h-4 w-72" /> |
| 42 | + <Skeleton className="h-4 w-64" /> |
| 43 | + <Skeleton className="h-4 w-56" /> |
| 44 | + </div> |
| 45 | + </div> |
| 46 | + } |
| 47 | + > |
| 48 | + <Hero /> |
| 49 | + </Suspense> |
| 50 | + <Suspense |
| 51 | + fallback={ |
| 52 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 53 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 54 | + <Skeleton className="h-6 w-40" /> |
| 55 | + <Skeleton className="h-4 w-72" /> |
| 56 | + <Skeleton className="h-4 w-64" /> |
| 57 | + <Skeleton className="h-4 w-56" /> |
| 58 | + </div> |
| 59 | + </div> |
| 60 | + } |
| 61 | + > |
| 62 | + <Bento /> |
| 63 | + </Suspense> |
| 64 | + <Suspense |
| 65 | + fallback={ |
| 66 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 67 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 68 | + <Skeleton className="h-6 w-40" /> |
| 69 | + <Skeleton className="h-4 w-72" /> |
| 70 | + <Skeleton className="h-4 w-64" /> |
| 71 | + <Skeleton className="h-4 w-56" /> |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + } |
| 75 | + > |
| 76 | + <Video /> |
| 77 | + </Suspense> |
| 78 | + <Suspense |
| 79 | + fallback={ |
| 80 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 81 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 82 | + <Skeleton className="h-6 w-40" /> |
| 83 | + <Skeleton className="h-4 w-72" /> |
| 84 | + <Skeleton className="h-4 w-64" /> |
| 85 | + <Skeleton className="h-4 w-56" /> |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + } |
| 89 | + > |
| 90 | + <HowItWorks /> |
| 91 | + </Suspense> |
| 92 | + <Suspense |
| 93 | + fallback={ |
| 94 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 95 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 96 | + <Skeleton className="h-6 w-40" /> |
| 97 | + <Skeleton className="h-4 w-72" /> |
| 98 | + <Skeleton className="h-4 w-64" /> |
| 99 | + <Skeleton className="h-4 w-56" /> |
| 100 | + </div> |
| 101 | + </div> |
| 102 | + } |
| 103 | + > |
| 104 | + <Brands /> |
| 105 | + </Suspense> |
| 106 | + <Suspense |
| 107 | + fallback={ |
| 108 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 109 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 110 | + <Skeleton className="h-6 w-40" /> |
| 111 | + <Skeleton className="h-4 w-72" /> |
| 112 | + <Skeleton className="h-4 w-64" /> |
| 113 | + <Skeleton className="h-4 w-56" /> |
| 114 | + </div> |
| 115 | + </div> |
| 116 | + } |
| 117 | + > |
| 118 | + <Testimonials /> |
| 119 | + </Suspense> |
| 120 | + <Suspense |
| 121 | + fallback={ |
| 122 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 123 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 124 | + <Skeleton className="h-6 w-40" /> |
| 125 | + <Skeleton className="h-4 w-72" /> |
| 126 | + <Skeleton className="h-4 w-64" /> |
| 127 | + <Skeleton className="h-4 w-56" /> |
| 128 | + </div> |
| 129 | + </div> |
| 130 | + } |
| 131 | + > |
| 132 | + <FaqSection /> |
| 133 | + </Suspense> |
27 | 134 | </div> |
28 | 135 | <div className="max-w-[2000px] w-full mx-auto"> |
29 | | - <CTA /> |
30 | | - <Footer /> |
| 136 | + <Suspense |
| 137 | + fallback={ |
| 138 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 139 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 140 | + <Skeleton className="h-6 w-40" /> |
| 141 | + <Skeleton className="h-4 w-72" /> |
| 142 | + <Skeleton className="h-4 w-64" /> |
| 143 | + <Skeleton className="h-4 w-56" /> |
| 144 | + </div> |
| 145 | + </div> |
| 146 | + } |
| 147 | + > |
| 148 | + <CTA /> |
| 149 | + </Suspense> |
| 150 | + <Suspense |
| 151 | + fallback={ |
| 152 | + <div className="py-20 text-center text-lg text-neutral-400"> |
| 153 | + <div className="mx-auto flex w-full max-w-md flex-col items-center gap-4 px-6"> |
| 154 | + <Skeleton className="h-6 w-40" /> |
| 155 | + <Skeleton className="h-4 w-72" /> |
| 156 | + <Skeleton className="h-4 w-64" /> |
| 157 | + <Skeleton className="h-4 w-56" /> |
| 158 | + </div> |
| 159 | + </div> |
| 160 | + } |
| 161 | + > |
| 162 | + <Footer /> |
| 163 | + </Suspense> |
31 | 164 | </div> |
32 | 165 | </main > |
33 | 166 | ) |
|
0 commit comments