feat(deploy): 添加 Docker 部署配置与 SSR 优化
- 添加 Dockerfile.static、docker-compose.server.yml 和 nginx-internal.conf - 优化 Hero 统计数据为 SSR 渲染,提升首屏性能 - 更新案例数据为政府单位数字化解决方案 - 统计数据改为动态计算,基于案例数据和当前年份 - 修复计数器动画初始状态问题
This commit is contained in:
@@ -5,6 +5,7 @@ import { useSearchParams } from 'next/navigation';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { HeroSection } from "@/components/sections/hero-section";
|
||||
import { SectionSkeleton } from "@/components/ui/loading-skeleton";
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
const ServicesSection = dynamic(
|
||||
() => import('@/components/sections/services-section').then(mod => ({ default: mod.ServicesSection })),
|
||||
@@ -46,7 +47,7 @@ const NewsSection = dynamic(
|
||||
}
|
||||
);
|
||||
|
||||
function HomeContent() {
|
||||
function HomeContent({ heroStats }: { heroStats: ReactNode }) {
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -80,7 +81,7 @@ function HomeContent() {
|
||||
|
||||
return (
|
||||
<main className="min-h-screen bg-white dark:bg-(--color-bg-primary)">
|
||||
<HeroSection />
|
||||
<HeroSection heroStats={heroStats} />
|
||||
<ServicesSection />
|
||||
<ProductsSection />
|
||||
<CasesSection />
|
||||
|
||||
Reference in New Issue
Block a user