diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-11-01 10:48:32 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-11-01 10:48:32 +0700 |
| commit | 20381b7dd4fcd05d6945466f1a22492ef60575ca (patch) | |
| tree | 2e937d37594d7c66fe1afc9d27f830f4607c3e6b /src/components/productCard.js | |
| parent | 260a6ab254a61f76d8975b21d2c8f31c4ca1269f (diff) | |
delete un-use file
Diffstat (limited to 'src/components/productCard.js')
| -rw-r--r-- | src/components/productCard.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/components/productCard.js b/src/components/productCard.js deleted file mode 100644 index f51473ad..00000000 --- a/src/components/productCard.js +++ /dev/null @@ -1,39 +0,0 @@ -import Link from "next/link"; -import currencyFormat from "../helpers/currencyFormat"; -import { createSlug } from "../helpers/slug"; -import { LazyLoadImage } from "react-lazy-load-image-component"; - -import 'react-lazy-load-image-component/src/effects/blur.css'; - - -export default function productCard({ data }) { - let product = data; - return ( - <div className="product-card"> - <Link href={'/shop/product/' + createSlug(product.name, product.id)} className="block"> - <LazyLoadImage effect="blur" src={product.image ? product.image : '/images/noimage.jpeg'} alt={product.name} className="product-card__image" /> - </Link> - <div className="product-card__description"> - <div> - {typeof product.manufacture.name !== undefined ? ( - <a href={'/shop/brands/' + createSlug(product.manufacture.name, product.manufacture.id)} className="product-card__brand">{product.manufacture.name}</a> - ) : ( - <span className="product-card__brand">-</span> - )} - <Link href={'/shop/product/' + createSlug(product.name, product.id)} className="product-card__title wrap-line-ellipsis-3"> - {product.name} - </Link> - </div> - <div> - {product.lowest_price.discount_percentage > 0 ? ( - <div className="flex gap-x-1 items-center mt-2"> - <span className="badge-yellow">{product.lowest_price.discount_percentage}%</span> - <p className="text-xs text-gray-800 line-through">{currencyFormat(product.lowest_price.price)}</p> - </div> - ) : ''} - <p className="text-sm text-gray-900 font-semibold">{product.lowest_price.price_discount > 0 ? currencyFormat(product.lowest_price.price_discount) : 'Tanya harga'}</p> - </div> - </div> - </div> - ) -}
\ No newline at end of file |
