import React, { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import separate from "../../utils/separate"; import StarRating from "../StarRating"; import ReactTooltip from "react-tooltip"; //assets import videoImage1 from "./videoImages/image-1.svg"; import videoImage2 from "./videoImages/image-2.svg"; import videoImage3 from "./videoImages/image-3.svg"; import videoImage4 from "./videoImages/image-4.svg"; import videoImage5 from "./videoImages/image-5.svg"; import videoImage6 from "./videoImages/image-6.svg"; import watermelon from "./watermelon.png"; // import video from "./danovin.mp4"; import discountImg from "./discount.png"; import heart from "./vuesax-linear-heart.svg"; import YellowDotIcon from "./yellowDotIcon.svg"; import RedDotIcon from "./redDotIcon.svg"; import PurpleDotIcon from "./purpleDotIcon.svg"; import LightBlueDotIcon from "./lightBlueDotIcon.svg"; import whitePlayIcon from "./white-play-button-icon.svg"; import { book } from "../../redux/actions"; const videoImages = [ videoImage1, videoImage2, videoImage3, videoImage4, videoImage5, videoImage6, ]; const VodProduct = ({ video, index, productColor, likeBtn, discountPricePercent, discountPrice, productContent, star, productTags, priceDirection, priceHolder, rangeHolder, priceTitle, addToCartHolder, priceStarHolder, priceStarAlignment, rangeWidth, price, height, grades, // minHeight, }) => { const [progressFlag, setProgressFlag] = useState(false); useEffect(() => { setTimeout(() => { setProgressFlag(true); }, 1000); }); return ( <>
{discountPricePercent && (

23 %

)} {likeBtn && (
)}
{productColor && (
)}

{"دوره ویدیویی" + " " + video?.name}

{"پایه" + " " + grades[video?.gradeId]}
{productContent && (

این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های خوب دیگری نیز دارد.

)}
{/* price */}
{priceHolder && (

{separate(video?.product[2]?.price) + " "} تومان

{addToCartHolder && ( )}
)}
{productTags && (
)} {rangeHolder && (
)}
); }; export default VodProduct; VodProduct.defaultProps = { colors: [ { icon: YellowDotIcon, dataType: "زرد", }, { icon: RedDotIcon, dataType: "قرمز", }, { icon: PurpleDotIcon, dataType: "بنفش", }, { icon: LightBlueDotIcon, dataType: "آبی", }, LightBlueDotIcon, ], // icons on product image productColor: true, likeBtn: true, discount: true, discountPricePercent: true, // product price discountPrice: true, priceHolder: true, priceTitle: false, productContent: false, star: true, productTags: false, productCat: true, rangeHolder: true, addToCartHolder: false, productTitleAlignment: "text-justify", // برای درصد دادن به عرض رنج rangeWidth: "75%", priceDirection: "flex-row", productTitleCategoryHolder: "flex-row", productTitleCategoryHolderAlignment: "items-center", priceStarHolder: "flex-row", priceStarAlignment: "items-center", poster: watermelon, };