import Link from 'next/link' import { prisma } from '@/lib/prisma' import { ComponentCard } from '@/components/ComponentCard' export default async function Home() { // 获取每种配件类型的前几个商品 const componentTypes = await prisma.componentType.findMany({ include: { components: { take: 6, orderBy: { createdAt: 'desc' } } } }) return (
{/* Hero Section */}

欢迎来到PC DIY商城

专业的电脑配件在线选购平台,让您轻松打造梦想主机

立即选购 在线装机
{/* Features Section */}

为什么选择我们

🔧

专业配件

提供CPU、内存、硬盘、主板、显卡、机箱等全系列配件

💰

价格优势

多品牌选择,不同价位满足各种预算需求

🚀

在线装机

智能配置推荐,一站式完成整机搭配

{/* Product Categories */}

热门配件

{componentTypes.map((type) => (

{type.name}

查看更多 →
{type.components.map((component) => ( ))}
))}
{/* CTA Section */}

准备开始装机了吗?

注册账号,享受更多服务和优惠

立即注册
) }