- 精简 Hero 组件,突出'永久免费'核心价值 - 简化 Contact、CostComparison、Features 组件 - 优化 SystemFeatures 展示逻辑 - 新增 FeaturesSimple 简化版功能组件 - 优化首页布局,提升加载速度 - 代码行数优化:-127 +53 相关文档:首页终极精简版.md、首页精简重构说明.md
36 lines
866 B
TypeScript
36 lines
866 B
TypeScript
'use client'
|
|
|
|
import { useEffect, useState } from 'react'
|
|
import Header from '@/components/Header'
|
|
import Hero from '@/components/Hero'
|
|
import FeaturesSimple from '@/components/FeaturesSimple'
|
|
import Contact from '@/components/Contact'
|
|
import Footer from '@/components/Footer'
|
|
|
|
// 禁用静态生成,因为使用了 NextAuth Session
|
|
export const dynamic = 'force-dynamic'
|
|
|
|
export default function Home() {
|
|
const [scrolled, setScrolled] = useState(false)
|
|
|
|
useEffect(() => {
|
|
const handleScroll = () => {
|
|
setScrolled(window.scrollY > 50)
|
|
}
|
|
|
|
window.addEventListener('scroll', handleScroll)
|
|
return () => window.removeEventListener('scroll', handleScroll)
|
|
}, [])
|
|
|
|
return (
|
|
<main className="min-h-screen">
|
|
<Header scrolled={scrolled} />
|
|
<Hero />
|
|
<FeaturesSimple />
|
|
<Contact />
|
|
<Footer />
|
|
</main>
|
|
)
|
|
}
|
|
|