From f8205ae2e0d2dbc9514e4d368e5a6b147ffe3929 Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Sat, 2 Jul 2022 16:49:11 +0430 Subject: [PATCH] =?UTF-8?q?=D9=85=D8=B1=D8=A8=D9=88=D8=B7=20=D8=A8=D9=87?= =?UTF-8?q?=20=D9=85=D9=88=D8=A7=D8=B1=D8=AF=DB=8C=20=DA=A9=D9=87=20=D9=82?= =?UTF-8?q?=D8=A8=D9=84=20=D8=A7=D8=B2=20=D8=A7=DB=8C=D9=86=20=D9=BE=D9=88?= =?UTF-8?q?=D8=B4=20=DA=A9=D8=B1=D8=AF=D9=85=20=D9=88=D9=84=DB=8C=20=D9=86?= =?UTF-8?q?=D9=85=DB=8C=D8=AF=D9=88=D9=86=D9=85=20=DA=86=D8=B1=D8=A7=20?= =?UTF-8?q?=D9=87=D9=85=D9=87=20=D8=B1=D8=A7=20=D8=A8=D8=A7=20=D9=87=D9=85?= =?UTF-8?q?=20=D9=BE=D9=88=D8=B4=20=D9=86=DA=A9=D8=B1=D8=AF=20|60?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ProductStatusCard/index.js | 27 ++++++++++++++++++++++- src/views/Product/Comment/index.js | 13 ++++++++--- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/components/ProductStatusCard/index.js b/src/components/ProductStatusCard/index.js index a2b1370..5a848f3 100644 --- a/src/components/ProductStatusCard/index.js +++ b/src/components/ProductStatusCard/index.js @@ -3,9 +3,9 @@ import { connect } from "react-redux"; import { userProduct } from "../../redux/actions"; import { toast } from "react-toastify"; import separate from "../../utils/separate"; - //components; import Button from "../Button"; +import location from "../../utils/location"; //assets import arrow from "./arrow-icon.svg"; @@ -14,6 +14,8 @@ import circle from "./info-circle.svg"; import shield from "./shield-tick.svg"; import tick from "./tick-circle.svg"; import shop from "./icon-shop.svg"; +import bookmarkDeactiveLightIcon from "../../assets/icons/bookmark-deactive-light.svg"; +import bookmarkDeactiveDarkIcon from "../../assets/icons/bookmark-deactive-dark.svg"; const ProductStatusCard = ({ price, @@ -28,7 +30,11 @@ const ProductStatusCard = ({ suggestedCounter, seller, shippingTime, + addToFavorite, + headerOptions, }) => { + const { logo, hamburgerMenu, qr, shown, menu, title, back, bookmark } = + headerOptions; return (
@@ -56,6 +62,7 @@ const ProductStatusCard = ({
)} +
@@ -66,6 +73,7 @@ const ProductStatusCard = ({
+ {garanty && (
@@ -77,6 +85,22 @@ const ProductStatusCard = ({
)} + {bookmark && ( +
+ bookmark addToFavorite({ [bookmark]: location.getId() })} + /> + + اضافه کردن به لیست علاقه مندی ها + +
+ )} +

{separate(price)} @@ -140,6 +164,7 @@ const mapStateToProps = (state) => ({ isDark: state.publicApi.isDark, isLogin: state.user.status, userId: state.user.status.id, + headerOptions: state.publicApi.headerOptions, }); const mapDispatchToProps = { diff --git a/src/views/Product/Comment/index.js b/src/views/Product/Comment/index.js index 50a0106..ef509e7 100644 --- a/src/views/Product/Comment/index.js +++ b/src/views/Product/Comment/index.js @@ -3,15 +3,22 @@ import userImage from "../../../assets/images/user.png"; function Comment({ comment }) { return ( -

+
- {comment?.name} + + {comment?.name} +
-

{comment?.text}

+

+ {comment?.text} +

); }