forked from emre/www_projectmycelium_com
- Removed unused Button imports from AgentHeroAlt, GallerySection, ComputeCapabilities, and StorageCapabilitiesNew - Replaced placeholder buttons/links with TODO comments indicating future implementation - Changed StorageCoreValue value items from <a> to <div> and removed href/target/rel attributes - Added descriptive TODO comments explaining what was previously rendered and what needs to be added - Affected components: AgentHeroAlt (
84 lines
1.8 KiB
TypeScript
84 lines
1.8 KiB
TypeScript
import { useEffect, useRef, useState } from 'react'
|
|
import { AnimatedSection } from '../../components/AnimatedSection'
|
|
import { CallToAction } from './CallToAction'
|
|
import { HomeTab } from './HomeTab'
|
|
import { HomeMap } from './HomeMap'
|
|
import { HomeAurora } from './HomeAurora'
|
|
import { HomeArchitecture } from './HomeArchitecture';
|
|
import { HomeDesign } from './HomeDesign';
|
|
|
|
function LazyHomeMapSection() {
|
|
const [isVisible, setIsVisible] = useState(false)
|
|
const containerRef = useRef<HTMLDivElement | null>(null)
|
|
|
|
useEffect(() => {
|
|
const el = containerRef.current
|
|
if (!el || isVisible) return
|
|
|
|
const observer = new IntersectionObserver(
|
|
(entries) => {
|
|
const [entry] = entries
|
|
if (entry.isIntersecting) {
|
|
setIsVisible(true)
|
|
observer.disconnect()
|
|
}
|
|
},
|
|
{
|
|
root: null,
|
|
rootMargin: '200px 0px',
|
|
threshold: 0.1,
|
|
},
|
|
)
|
|
|
|
observer.observe(el)
|
|
|
|
return () => {
|
|
observer.disconnect()
|
|
}
|
|
}, [isVisible])
|
|
|
|
return (
|
|
<div ref={containerRef}>
|
|
{isVisible ? (
|
|
<HomeMap />
|
|
) : (
|
|
<div className="max-w-7xl mx-auto px-6 py-16 text-center text-gray-400">
|
|
<p className="text-sm md:text-base">
|
|
Loading live node map when you scroll here…
|
|
</p>
|
|
</div>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default function HomePage() {
|
|
return (
|
|
<div>
|
|
<AnimatedSection>
|
|
<HomeAurora />
|
|
</AnimatedSection>
|
|
|
|
<AnimatedSection>
|
|
<HomeArchitecture />
|
|
</AnimatedSection>
|
|
|
|
<AnimatedSection>
|
|
<HomeTab />
|
|
</AnimatedSection>
|
|
|
|
<AnimatedSection>
|
|
<LazyHomeMapSection />
|
|
</AnimatedSection>
|
|
|
|
|
|
<HomeDesign />
|
|
|
|
|
|
|
|
<CallToAction />
|
|
|
|
</div>
|
|
)
|
|
}
|