|
| 1 | +import React, { Suspense, lazy } from 'react'; |
| 2 | +import StarBackground from '@/components/StarBackground'; |
1 | 3 |
|
2 | | -import React from 'react'; |
3 | | - |
4 | | -import Hero from '@/components/Hero'; |
5 | | -import ExploreSpacesSection from '@/components/ExploreSpacesSection'; |
6 | | -import EcosystemSection from '@/components/EcosystemSection'; |
7 | | -import FeaturesSection from '@/components/FeaturesSection'; |
8 | | -import FinancialFreedomSection from '@/components/FinancialFreedomSection'; |
9 | | -import ParticipationSection from '@/components/ParticipationSection'; |
| 4 | +// Lazy loading de secciones |
| 5 | +const Hero = lazy(() => import('@/components/Hero')); |
| 6 | +const ExploreSpacesSection = lazy(() => import('@/components/ExploreSpacesSection')); |
| 7 | +const EcosystemSection = lazy(() => import('@/components/EcosystemSection')); |
| 8 | +const FeaturesSection = lazy(() => import('@/components/FeaturesSection')); |
| 9 | +const FinancialFreedomSection = lazy(() => import('@/components/FinancialFreedomSection')); |
| 10 | +const ParticipationSection = lazy(() => import('@/components/ParticipationSection')); |
10 | 11 |
|
11 | 12 | const Index: React.FC = () => { |
12 | 13 | return ( |
13 | 14 | <div className="relative z-10 min-h-screen"> |
14 | | - <Hero /> |
15 | | - <FinancialFreedomSection /> |
16 | | - <ExploreSpacesSection /> |
17 | | - <EcosystemSection /> |
18 | | - <FeaturesSection /> |
19 | | - <div className="section-center"> |
20 | | - <ParticipationSection /> |
| 15 | + {/* Hero con efecto Star Wars + estrellas */} |
| 16 | + <div className="relative"> |
| 17 | + <div className="absolute inset-0 -z-10"> |
| 18 | + <StarBackground /> |
| 19 | + </div> |
| 20 | + <Suspense fallback={<div className="h-[80vh] flex items-center justify-center">Loading...</div>}> |
| 21 | + <Hero /> |
| 22 | + </Suspense> |
21 | 23 | </div> |
| 24 | + |
| 25 | + {/* Secciones con lazy loading */} |
| 26 | + <Suspense fallback={<div className="h-40 flex items-center justify-center">Loading section...</div>}> |
| 27 | + <FinancialFreedomSection /> |
| 28 | + </Suspense> |
| 29 | + |
| 30 | + <Suspense fallback={<div className="h-40 flex items-center justify-center">Loading section...</div>}> |
| 31 | + <ExploreSpacesSection /> |
| 32 | + </Suspense> |
| 33 | + |
| 34 | + <Suspense fallback={<div className="h-40 flex items-center justify-center">Loading section...</div>}> |
| 35 | + <EcosystemSection /> |
| 36 | + </Suspense> |
| 37 | + |
| 38 | + <Suspense fallback={<div className="h-40 flex items-center justify-center">Loading section...</div>}> |
| 39 | + <FeaturesSection /> |
| 40 | + </Suspense> |
| 41 | + |
| 42 | + <Suspense fallback={<div className="h-40 flex items-center justify-center">Loading section...</div>}> |
| 43 | + <div className="section-center"> |
| 44 | + <ParticipationSection /> |
| 45 | + </div> |
| 46 | + </Suspense> |
22 | 47 | </div> |
23 | 48 | ); |
24 | 49 | }; |
|
0 commit comments