diff --git a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js index 165545a..c76007d 100644 --- a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js +++ b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js @@ -82,7 +82,7 @@ class NavbarDrawer extends Component {
{item.icon}
{item.name}
- {item.badge &&
{item.badge}
} + {item.message &&
{item.message}
}
))} @@ -124,54 +124,63 @@ NavbarDrawer.defaultProps = { link: "/", icon: صفحه اصلی, toast: "", + message : "", }, { name: "واقعیت افزوده", link: "/", icon: واقعیت افزوده, toast: "", + message : "", }, { name: "بارکد خوان", link: "/qr-scan", icon: بارکد خوان, toast: "", + message : "", }, { name: "کتاب الکترونیک", link: "/activation", icon: کتاب الکترونیک, toast: "", + message : "", }, { name: "فروشگاه", link: "/products", icon: فروشگاه, toast: "", + message : "", }, { name: "بلاگ", link: "/blog", icon: بلاگ, toast: "", + message : "", }, { name: "پیام رسان", link: "/chatroom", icon: بلاگ, toast: "", + message : "", }, { name: "ویرایش مشخصات", link: "/profile", icon: ویرایش مشخصات, toast: "", + message : "4 پیام", }, { name: "گزارش ایراد", link: "/", icon: گزارش ایراد, toast: "", + message : "", // onClick: this.props.logout, }, { @@ -179,6 +188,7 @@ NavbarDrawer.defaultProps = { link: "/", icon: خروج, toast: "", + message : "", // onClick: this.props.logout, }, ], diff --git a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.scss b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.scss index aa3f20f..bf29e72 100644 --- a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.scss +++ b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.scss @@ -74,14 +74,18 @@ width: 100%; align-items: center; padding: 15px 10px; + position: relative; & img { width: 20px; height: 20px; margin-left: 20px; } & .badge { - background-color: rgb(160, 60, 209); + background-color: red; margin: 5px; + position: absolute; + left: 5px; + top: 12px; } } &--button { diff --git a/src/views/Home/Navbar/Mobile/index.scss b/src/views/Home/Navbar/Mobile/index.scss index 23968af..1a8b54d 100644 --- a/src/views/Home/Navbar/Mobile/index.scss +++ b/src/views/Home/Navbar/Mobile/index.scss @@ -6,7 +6,7 @@ justify-content: space-between; align-items: center; background-color: white; - z-index: 200; + z-index: 400; padding: 15px 10px; &__menu{ img{ diff --git a/src/views/Products/Filters/index.scss b/src/views/Products/Filters/index.scss index 64512b5..7280e06 100644 --- a/src/views/Products/Filters/index.scss +++ b/src/views/Products/Filters/index.scss @@ -1,3 +1,5 @@ .products-filters{ flex: 1; + position: sticky; + top: 0px; } \ No newline at end of file diff --git a/src/views/Products/Product/index.js b/src/views/Products/Product/index.js index 51a4b71..1ffb815 100644 --- a/src/views/Products/Product/index.js +++ b/src/views/Products/Product/index.js @@ -1,6 +1,8 @@ import React, { Component } from "react"; import { Link } from "react-router-dom"; +import basket from "../../../assets/icons/basket.png"; + import "./index.scss"; const maxMobileSize = 550; @@ -21,36 +23,41 @@ const fontSize = { } export default class Product extends Component { render() { - const { product } = this.props; + const { product, id } = this.props; return ( <> {window.innerWidth < 1000 ? ( -
- - {product.title} -

{product.title}

-

{product.subTitle}

- {product.price ? ( -
- {product.oldPrice ? ( -
-
- {product.oldPrice} تومان - -
-
- ) : null} -
- {product.price} تومان -
-
- ) : ( -
- ناموجود -
- )} +
+ {"عکس +
+ + کتاب دیجیتال + { !product.status.digital ? افزودن به سبد خرید : null} -
+ + واقعیت افزوده + { !product.status.ar ? افزودن به سبد خرید : null} + + + ) : null} {window.innerWidth > 1000 ? (
@@ -83,3 +90,4 @@ export default class Product extends Component { ); } } + diff --git a/src/views/Products/index.js b/src/views/Products/index.js index bb7a2cb..24759aa 100644 --- a/src/views/Products/index.js +++ b/src/views/Products/index.js @@ -75,7 +75,7 @@ export default class Products extends Component {
{this.props.products.map((item, i) => ( - + ))}
@@ -118,6 +118,10 @@ Products.defaultProps = { price: "78.000", oldPrice: "", date: new Date(), + status: { + digital: true, + ar: true, + }, }, { id: 1, @@ -127,6 +131,10 @@ Products.defaultProps = { price: "39.000", oldPrice: "59.000", date: new Date(), + status: { + digital: true, + ar: true, + }, }, { id: 2, @@ -135,6 +143,10 @@ Products.defaultProps = { subTitle: "پایه ششم ابتدایی", price: "21.000", oldPrice: "", + status: { + digital: true, + ar: true, + }, }, { id: 3, @@ -143,6 +155,10 @@ Products.defaultProps = { subTitle: "پایه دهم ابتدایی", price: "", oldPrice: "", + status: { + digital: true, + ar: true, + }, }, { id: 4, @@ -151,6 +167,10 @@ Products.defaultProps = { subTitle: "پایه هفتم ابتدایی", price: "59.000", oldPrice: "", + status: { + digital: true, + ar: true, + }, }, { id: 5, @@ -160,6 +180,10 @@ Products.defaultProps = { price: "78.000", oldPrice: "", date: new Date(), + status: { + digital: true, + ar: true, + }, }, { id: 6, @@ -169,6 +193,10 @@ Products.defaultProps = { price: "39.000", oldPrice: "59.000", date: new Date(), + status: { + digital: true, + ar: true, + }, }, { id: 7, @@ -178,6 +206,10 @@ Products.defaultProps = { price: "21.000", oldPrice: "", date: new Date(), + status: { + digital: true, + ar: true, + }, }, { id: 8, @@ -187,6 +219,10 @@ Products.defaultProps = { price: "", oldPrice: "", date: new Date(), + status: { + digital: true, + ar: true, + }, }, { id: 9, @@ -196,6 +232,10 @@ Products.defaultProps = { price: "59.000", oldPrice: "", date: new Date(), + status: { + digital: true, + ar: true, + }, }, ], };