import parse from 'html-react-parser'; import { formatPrice } from "@/lib/utils"; import ProductImage from "./images"; import Static from "./static"; import ProductDescription from "./description" import Comment from "./comments"; import Review from "./reviews"; import ProductSpec from "./specifications"; import Article from "./articles"; import ProductPrice from "./price"; import ProductOffer from "./offer"; import Buttons from "./buttons"; import ProductSummary from "./summary"; import ScrollToReviewButton from "./buttons/ScrollToReviewButton"; import ProductTab from "./products"; import { ReviewData } from "@/data/reviews"; export default async function ProductDetail({ slug }: any) { const imageList = { productImage : slug.productImage, imageCollection : slug.imageCollection } const priceData = { price : slug.price, marketPrice : slug.marketPrice, deal_list : slug.deal_list, price_off : slug.price_off, sale_rules : slug.sale_rules, hasVAT : slug.hasVAT, warranty : slug.warranty, quantity : slug.quantity } return ( <>

{slug.productName}

Lượt xem: {formatPrice(slug.visit) }

Tình trạng: { slug.quantity > 0 ? parse('Còn hàng') : parse('Liên hệ') }

{ slug.productSummary && }

Miễn phí giao hàng trên toàn quốc

{ slug.productDescription && }

Đánh giá và bình luận

{slug.productSpec && } { slug.related['article-article'].length > 0 &&
}
{/* Sản phẩm tương tự + Sản phẩm đã xem */}
); }