'use client'; import { Product } from '@/lib/storm/product'; import { Image } from '@/lib/storm/types'; import Text from 'components/ui/text/text'; import { cn } from 'lib/utils'; import { useTranslations } from 'next-intl'; import { Suspense } from 'react'; import { Gallery } from './gallery'; import { Grid } from './grid'; import Price from './price'; interface ProductViewProps { product: Product; relatedProducts: Product[]; } export default function ProductView({ product, relatedProducts }: ProductViewProps) { const t = useTranslations('product'); const { name, description, price, images } = product; return (
({ src: image.url, alt: image.alt }))} />
({ src: image.url, alt: image.alt, height: image.height, width: image.width }))} /> {/* {images.map((image: Image, index: number) => (
))} */}
{name} {description}
{relatedProducts.length > 0 && (
{t('related')}
)}
); }