From 66fda6c01499be0b8ae3f92701b5dd5253e7bab3 Mon Sep 17 00:00:00 2001 From: Pkpedram Date: Wed, 26 Jan 2022 18:22:29 +0330 Subject: [PATCH] Moshakhasat Made --- src/components/ProductDescription/index.js | 111 ++++++++++++++++++ .../Product/Desktop/ProductOverAll/index.js | 57 +++++++-- 2 files changed, 160 insertions(+), 8 deletions(-) create mode 100644 src/components/ProductDescription/index.js diff --git a/src/components/ProductDescription/index.js b/src/components/ProductDescription/index.js new file mode 100644 index 0000000..aa11d56 --- /dev/null +++ b/src/components/ProductDescription/index.js @@ -0,0 +1,111 @@ +import React from "react"; + +const ProductDescription = ({ + navTitles, + items, + addToCart +}) =>{ + return( + <> +
+ +
+
+
+ {items.map(e => ( + + e.items.map(item => ( +
    +
  • {item.title}
  • +
  • {item.description}
  • +
+ )) + + + ))} +
+
+ {addToCart} +
+ +
+ + ); +}; + + + + + +export default ProductDescription; + + + + +ProductDescription.defaultProps = { + navTitles: [ + { + id: 0, + title: 'مشخصات', + isActive: true, + name: 'moshakhasat' + }, + { + id: 1, + title: 'نقد و بررسی', + isActive: false + }, + { + id: 2, + title: 'برسش و باسخ', + isActive:false + }, + ], + items: [ + { + name: 'moshakhasat', + items: [ + { + title : 'وزن کتاب', + description: '۱ کیلوگرم' + }, + { + title : 'تعداد صفحات', + description: '400 صفحه' + }, + { + title : 'نوع کاغذ', + description: 'گلاسه' + }, + { + title : 'شماره شابک', + description: '1225548218000005818765' + }, + { + title : 'انتشارات', + description: 'رزمندگان' + }, + { + title : 'نویسنده و یا معلف', + description: 'یک نویسنده گمنام' + }, + { + title : 'قطع', + description: 'خشتی' + }, + { + title : 'سال انتشار', + description: '1399' + }, + ] + } + ] + +} \ No newline at end of file diff --git a/src/views/Product/Desktop/ProductOverAll/index.js b/src/views/Product/Desktop/ProductOverAll/index.js index f3d166e..88219ee 100644 --- a/src/views/Product/Desktop/ProductOverAll/index.js +++ b/src/views/Product/Desktop/ProductOverAll/index.js @@ -11,6 +11,7 @@ import Rate from "../../Rate"; import StarRating from "../../../../components/StarRating"; import AddToCartCard from "../../../../components/AddToCart"; import logo from '../../../../assets/images/user.png'; +import ProductDescription from "../../../../components/ProductDescription"; export const ProductOverAll = ({ productType, @@ -33,7 +34,7 @@ export const ProductOverAll = ({
@@ -153,6 +154,52 @@ export const ProductOverAll = ({
+ + + proxy.status() + ? pushToCart({ + productId: + type === "digital" + ? book?.product[0]?.id + : book?.product[1]?.id, + userId: userId, + count: 1, + }) + : toast.info("ابتدا وارد حساب کاربری خود شوید.") + } + title='افزودن به سبد خرید' + backgroundColor="bg-blueC0" + border={{ color: "#196EC055", width: "1px" }} + width="100%" + color="text-white" + twPaddings='py-4' + /> + } + + // footer='SendBack' + + /> + } + + + /> -

- نسخه محصول را انتخاب کنید -

- -
- -
+