diff --git a/build.zip b/build.zip deleted file mode 100644 index 733e8fa..0000000 Binary files a/build.zip and /dev/null differ diff --git a/src/App.js b/src/App.js index f73ab32..a3e07e9 100644 --- a/src/App.js +++ b/src/App.js @@ -58,13 +58,13 @@ function App() { {/* */} {/* */} {/* */} - + {/* */} {/* */} {/* */} - + {/* */} {/* */} - - {/* */} + {/* */} + {/* */} {/* */} {/* */} diff --git a/src/components/Advertisement/design1/index.js b/src/components/Advertisement/design1/index.js index 7f6262c..b8636cd 100644 --- a/src/components/Advertisement/design1/index.js +++ b/src/components/Advertisement/design1/index.js @@ -2,23 +2,26 @@ import React from "react"; const AdvertisementDesign1 = () => { return ( -
+
-
+ >
*/}

تبلیغات دانوینی

diff --git a/src/components/Advertisement/design2/index.js b/src/components/Advertisement/design2/index.js index e32ef01..fbccb5c 100644 --- a/src/components/Advertisement/design2/index.js +++ b/src/components/Advertisement/design2/index.js @@ -18,16 +18,16 @@ const AdvertisementDesign2 = () => {

diff --git a/src/components/ProductImage/index.js b/src/components/ProductImage/index.js index 1db573c..4d277df 100644 --- a/src/components/ProductImage/index.js +++ b/src/components/ProductImage/index.js @@ -1,14 +1,34 @@ import React from "react"; +import "./index.scss"; + import productImg from "./productImg.svg"; -const ProductImage = () => { +const ProductImage = ({ images }) => { + console.log(images.length); + if (images.length > 3) { + } + return (
-
-
- {[0, 1, 2, 3, 4].map((item, index) => ( - +
+
+ {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 && }
))}
-

+

{productPrice} - تومان + تومان

با خرید این کالا @@ -56,7 +54,7 @@ const ProductStatusCard = ({ items, productPrice, discountPrice }) => {

-