update src/components/Product/index.js and src/components/ProductDescription/index.js

temp
mahdi 2 years ago
parent 5da07bf32b
commit 36eb8a63af
  1. 2
      src/components/Product/index.js
  2. 47
      src/components/ProductDescription/index.js

@ -99,7 +99,7 @@ const ProductDesign = ({
)} )}
{productCat && ( {productCat && (
<span className={`text-sm py-1 font-normal text-blueC0`}> <span className={`text-sm py-1 font-normal text-blueC0`}>
{"پایه" + " " + grades[product?.gradeId]} {'${window.t("پایه")}' + " " + grades[product?.gradeId]}
</span> </span>
)} )}
</div> </div>

@ -31,7 +31,10 @@ const ProductDescription = ({ navTitles, items, addToCart }) => {
{items.map((item, index) => {items.map((item, index) =>
item.name == name item.name == name
? item.items.map((item, index) => ( ? item.items.map((item, index) => (
<ul className="flex w-full flex-1 my-2 items-center" key={index}> <ul
className="flex w-full flex-1 my-2 items-center"
key={index}
>
{item.title ? ( {item.title ? (
<li <li
className="py-4 px-8 min-w-md bg-gray-200 ml-4 text-blueC0" className="py-4 px-8 min-w-md bg-gray-200 ml-4 text-blueC0"
@ -60,19 +63,23 @@ ProductDescription.defaultProps = {
navTitles: [ navTitles: [
{ {
id: 0, id: 0,
title: "مشخصات", title: "",
title: `${window.t("مشخصات")}`,
isActive: true, isActive: true,
name: "moshakhasat", name: "moshakhasat",
}, },
{ {
id: 1, id: 1,
title: "نقد و بررسی", title: `${window.t("نقد و بررسی")}`,
isActive: false, isActive: false,
name: "review", name: "review",
}, },
{ {
id: 2, id: 2,
title: "برسش و باسخ", title: `${window.t("برسش و باسخ")}`,
isActive: false, isActive: false,
}, },
], ],
@ -81,35 +88,35 @@ ProductDescription.defaultProps = {
name: "moshakhasat", name: "moshakhasat",
items: [ items: [
{ {
title: "وزن کتاب", title: `${window.t("نوع تعداد وزن کتاب")}`,
description: "۱ کیلوگرم", description: `${window.t("۱ کیلوگرم")}`,
}, },
{ {
title: "تعداد صفحات", title: `${window.t("نوع تعداد صفحات")}`,
description: "400 صفحه", description: `${window.t("400 صفحه")}`,
}, },
{ {
title: "نوع کاغذ", title: `${window.t("نوع کاغذ")}`,
description: "گلاسه", description: `${window.t("گلاسه")}`,
}, },
{ {
title: "شماره شابک", title: `${window.t("شماره شابک")}`,
description: "1225548218000005818765", description: `${window.t("1225548218000005818765")}`,
}, },
{ {
title: "انتشارات", title: `${window.t("انتشارات")}`,
description: "رزمندگان", description: `${window.t("رزمندگان")}`,
}, },
{ {
title: "نویسنده و یا معلف", title: `${window.t("نویسنده و یا معلف")}`,
description: "یک نویسنده گمنام", description: `${window.t("یک نویسنده گمنام")}`,
}, },
{ {
title: "قطع", title: `${window.t("قطع")}`,
description: "خشتی", description: `${window.t("خشتی")}`,
}, },
{ {
title: "سال انتشار", title: `${window.t("سال انتشار")}`,
description: "1399", description: "1399",
}, },
], ],
@ -118,7 +125,7 @@ ProductDescription.defaultProps = {
name: "review", name: "review",
items: [ items: [
{ {
description: "لورم ایبسوم", description: `${window.t("لورم ایبسوم")}`,
}, },
], ],
}, },

Loading…
Cancel
Save