diff --git a/src/assets/icons/delete.svg b/src/assets/icons/delete.svg new file mode 100644 index 0000000..e2bfc10 --- /dev/null +++ b/src/assets/icons/delete.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/components/BG/index.js b/src/components/BG/index.js index daa6353..424be08 100644 --- a/src/components/BG/index.js +++ b/src/components/BG/index.js @@ -12,6 +12,7 @@ export const BG = ({ isDark }) => { const mapStateToProps = (state) => ({ isDark: state.publicApi.isDark, + isMobile: state.publicApi.isMobile }); const mapDispatchToProps = {}; diff --git a/src/components/Button/index.js b/src/components/Button/index.js index fbdc092..377752f 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -13,7 +13,7 @@ export default function Button({ }) { return ( + + {product.count} + + + +
+ +  {product?.product?.price}  تومان + + delete +
+ ); } const mapStateToProps = (state) => ({ grades: state.publicApi.grades, + isMobile: state.publicApi.isMobile, }); const mapDispatchToProps = { diff --git a/src/views/ShoppingCart/index.js b/src/views/ShoppingCart/index.js index cd91dc9..f985cc9 100644 --- a/src/views/ShoppingCart/index.js +++ b/src/views/ShoppingCart/index.js @@ -10,22 +10,6 @@ import alertIcon from "../../assets/icons/alert.svg"; import { connect } from "react-redux"; -const PriceStatus = ({ name, value, type, isDark }) => { - return ( -
- {name} - - {value + " " + "تومان"} - -
- ); -}; - function ShoppingCart({ isDark, isMobile, @@ -40,6 +24,7 @@ function ShoppingCart({ payFactor, headerOptions, setHeaderOptions, + desktopContentTransform, }) { useEffect(() => { getList(); @@ -48,71 +33,173 @@ function ShoppingCart({ }, []); const Table = () => { - - } - return ( - <> - {isMobile ? ( -
+ return ( +
+
+ + کالاهای انتخابی{" "} + + + تعداد سفارش + + + مبلغ + +
+
+ ); + }; + + return isMobile ? ( +
+ {list.map((product, index) => ( + + ))} + +
+ + + +
+
+ + جمع کل سبد خرید + +

+ {factorInfo?.payPrice + " " + "تومان"} +

+
+
+ +

+ هزینه ارسال کالا پس از تعیین محل آدرس مشخص می‌شود +

+
+
+ ) : ( +
+
+ + +
+
+ + +
- ) : ( -
-
-
- - +
+ + جمع کل سبد خرید + +

+ {factorInfo?.payPrice} + تومان +

+
+
+ +

+ هزینه ارسال کالا پس از تعیین محل آدرس مشخص می‌شود +

- )} - +