This commit is contained in:
Your Name committed 2026-07-12 03:05:03 -04:00
1 parent ef26b107ca
commit 07f04e2065
2 files changed
+86 -15

No files matched your search

@@ -7,6 +7,7 @@ import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { getCategoryImage, type Product } from '@homaroma/types'
import AddToCartSection from '@/components/AddToCartSection'
import ProductGallery from '@/components/ProductGallery'
import DynamicPageRenderer from '@/components/dynamic/DynamicPageRenderer'
import ProductCard from '@/components/ProductCard'
import { getCategoriesResult, getCmsPageResult, getProduct, getProductResult, getProductsResult } from '@/lib/cms'
@@ -154,7 +155,7 @@ export default async function ProductDetailPage({ params }: { params: Promise<{
{announcementSections.length > 0 && (
<DynamicPageRenderer sections={announcementSections} categories={categories} lang={lang} />
)}
<div className="mx-auto max-w-7xl space-y-16 px-6 pt-32 pb-14 md:pt-40 md:pb-20">
<div className="mx-auto max-w-7xl space-y-8 px-6 pt-28 pb-14 md:pt-32 md:pb-20">
<nav className="flex flex-wrap items-center gap-2 text-xs font-semibold uppercase tracking-widest text-muted-text/70">
<Link href="/" className="transition hover:text-brand-primary">Home</Link>
<span>/</span>
@@ -168,20 +169,11 @@ export default async function ProductDetailPage({ params }: { params: Promise<{
</nav>
<section className="grid gap-10 md:grid-cols-2 md:gap-16">
<div className="relative aspect-square overflow-hidden rounded-3xl bg-surface-card shadow-card">
<Image
src={imageUrl}
alt={productName}
fill
priority={true}
className="object-cover"
/>
{categoryName && (
<div className="absolute left-5 top-5 rounded-full bg-surface-card/90 px-4 py-2 text-xs font-bold uppercase tracking-widest text-text-main shadow-sm">
{categoryName}
</div>
)}
</div>
<ProductGallery
images={product.images?.map(img => img.url) || [imageUrl]}
productName={productName}
categoryName={categoryName}
/>
<AddToCartSection product={product} />
</section>