import Link from "next/link"; import currencyFormat from "../helpers/currencyFormat"; import { createSlug } from "../helpers/slug"; export default function productCard({ data }) { let product = data; return (
{product.name}
{typeof product.manufacture.name !== undefined ? ( {product.manufacture.name} ) : ( - )} {product.name}
{product.lowest_price.discount_percentage > 0 ? (
{product.lowest_price.discount_percentage}%

{currencyFormat(product.lowest_price.price)}

) : ''}

{product.lowest_price.price_discount > 0 ? currencyFormat(product.lowest_price.price_discount) : 'Tanya harga'}

) }