|
|
|
@ -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 ( |
|
|
|
|
<section className="w-full" style={{ minWidth: 350 }}> |
|
|
|
|
<div className="bg-grayF9 rounded-md px-4 py-2 divide-y divide-solid divide-gray-200"> |
|
|
|
@ -56,6 +62,7 @@ const ProductStatusCard = ({ |
|
|
|
|
<img src={circle} alt="" className="w-5" /> |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
<div className="flex flex-row items-center justify-between py-3"> |
|
|
|
|
<div className="flex flex-row items-center"> |
|
|
|
|
<img src={delivery} alt="" className="w-8" /> |
|
|
|
@ -66,6 +73,7 @@ const ProductStatusCard = ({ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{garanty && ( |
|
|
|
|
<div className="flex flex-row items-center justify-between py-3"> |
|
|
|
|
<div className="flex flex-row items-center"> |
|
|
|
@ -77,6 +85,22 @@ const ProductStatusCard = ({ |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
{bookmark && ( |
|
|
|
|
<div className="flex flex-row items-center py-3"> |
|
|
|
|
<img |
|
|
|
|
src={ |
|
|
|
|
isDark ? bookmarkDeactiveDarkIcon : bookmarkDeactiveLightIcon |
|
|
|
|
} |
|
|
|
|
alt="bookmark" |
|
|
|
|
className="w-7" |
|
|
|
|
onClick={() => addToFavorite({ [bookmark]: location.getId() })} |
|
|
|
|
/> |
|
|
|
|
<span className="mr-3 text-sm"> |
|
|
|
|
اضافه کردن به لیست علاقه مندی ها |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
<div className="flex flex-col items-center py-3"> |
|
|
|
|
<p className="text-6xl text-blueC0 font-bold"> |
|
|
|
|
{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 = { |
|
|
|
|