+
+ {images.slice(0, 4).map((image, index) => (
+
+
+ {/* این خط پایین که نوشتم برای این است که ایندکس که جنسش استرینگ است رو به نامبر تبدیل کند */}
+ {Number(index) === 3 && (
+
+ {images.length - 3}
+
+ )}
+
))}
@@ -16,5 +36,28 @@ const ProductImage = () => {
);
};
+// {[0, 1, 2, 3, 4].map((item, index) => (
+
+// ))}
export default ProductImage;
+
+ProductImage.defaultProps = {
+ images: [
+ {
+ image: productImg,
+ },
+ {
+ image: productImg,
+ },
+ {
+ image: productImg,
+ },
+ {
+ image: productImg,
+ },
+ {
+ image: productImg,
+ },
+ ],
+};
diff --git a/src/components/ProductImage/index.scss b/src/components/ProductImage/index.scss
new file mode 100644
index 0000000..f0bf785
--- /dev/null
+++ b/src/components/ProductImage/index.scss
@@ -0,0 +1,9 @@
+.no-scrollbar::-webkit-scrollbar {
+ display: none;
+}
+
+/* Hide scrollbar for IE, Edge and Firefox */
+.no-scrollbar {
+ -ms-overflow-style: none; /* IE and Edge */
+ scrollbar-width: none; /* Firefox */
+}
diff --git a/src/components/ProductStatusCard/index.js b/src/components/ProductStatusCard/index.js
index 22a1165..49c6b1f 100644
--- a/src/components/ProductStatusCard/index.js
+++ b/src/components/ProductStatusCard/index.js
@@ -21,7 +21,7 @@ const ProductStatusCard = ({ items, productPrice, discountPrice }) => {
key={index}
>
-
+
{item.subtitle}
@@ -37,17 +37,15 @@ const ProductStatusCard = ({ items, productPrice, discountPrice }) => {
)}
- {item.alertIcon && (
-
- )}
+ {item.alertIcon &&
}