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} +

); }