Add To Cart Show Product Made

temp
Pedram Keshavarzi 3 years ago
parent 9729e99d5e
commit 89a8d016bc
  1. 17
      src/components/AddToCart/index.js
  2. 7
      src/views/Product/Desktop/ProductOverAll/index.js

@ -11,7 +11,11 @@ const AddToCartCard = ({
sendingTime,
button,
price,
profit
profit,
showProduct,
productName,
productImg,
productCat
}) =>{
const specialities = [
{
@ -28,7 +32,16 @@ const AddToCartCard = ({
}
];
return(
<div className="felx flex-col bg-grayF7 p-4 pt-0 w-full mx-4 items-center justify-center">
<div className="felx flex-col bg-grayF7 p-4 pt-0 w-full mx-4 items-center justify-center ">
{
showProduct && <div className="flex w-full max-w-8 overflow-hidden items-center py-4 m-0 justify-center">
<img src={productImg} style={{maxWidth:'100px'}} className=" bg-grayF4 py-2 px-4 bg-grayF4 rounded ml-4" />
<div className="text-sm">
<h1 className="text-sm">{productName}</h1>
<p className=" text-xs pt-2 text-blueC0">{productCat}</p>
</div>
</div>
}
{specialities.map((item, index) => (
<div className="flex items-center p-2 w-full border-0 border-b border-solid border-gray-300">
{item.icon && <img src={item.icon} className="pl-3" />}

@ -10,6 +10,7 @@ import Comment from "../../Comment";
import Rate from "../../Rate";
import StarRating from "../../../../components/StarRating";
import AddToCartCard from "../../../../components/AddToCart";
import logo from '../../../../assets/images/user.png';
export const ProductOverAll = ({
productType,
@ -117,6 +118,12 @@ export const ProductOverAll = ({
sendingTime={20}
numberOfSuggest={160}
profit={12000}
// showProduct
productCat={grades[book?.gradeId]}
productImg={`https://dnvn.ir/api/v1/file/${book?.fileIds}`}
productName={type === "digital"
? book?.product[0]?.name
: book?.product[1]?.name}
button={
<Button
onClick={() =>

Loading…
Cancel
Save