diff --git a/src/components/Navbar/index.js b/src/components/Navbar/index.js index bef43d1..6ccc517 100644 --- a/src/components/Navbar/index.js +++ b/src/components/Navbar/index.js @@ -11,7 +11,7 @@ import OverLayer from "../OverLayer"; import cartIcon from "./cart-blue.svg"; // import whiteCartIcon from "./white-cart-icon.svg"; // import profileIcon from "./dark-crimson-profile-icon.svg"; -// import searchIcon from "./dark-crimson-search-box.svg"; +import searchIcon from "./dark-crimson-search-box.svg"; // import lightGraySearchIcon from "./light-gray-search-box.svg"; import darkCrimsonHamburgerMenu from "./dark-crimson-hamburger-menu.svg"; // import whiteHamburgerMenu from "./white-hamburger-menu-icon.svg"; @@ -40,24 +40,14 @@ function Navbar({ isMobile, isLogin, headerOptions, - loginBtn, - menuItems, - category, - searchBox, - topHeader, - bottomHeader, - productCategoryTextColor, - menuItemsColor, }) { const navigation = useNavigate(); const { logo, hamburgerMenu, qr, shown, menu, title, back, bookmark } = headerOptions; - + const [overLayer, setOverLayer] = useState(false); const [top, setTop] = useState(false); const [search, setSearch] = useState(null); const [drawerOpen, setDrawerOpen] = useState(false); - const [desktopMiddleFix, setDesktopMiddleFix] = useState(false); - const [desktopEndTransform, setDesktopEndTransform] = useState(false); useEffect(() => { if (window.scrollY === 0) { @@ -204,112 +194,78 @@ function Navbar({ {/* portrait end */} ) : ( -
-
-
- {/* - انتخاب کشور - */} - - پیگیری سفارش - -
-
- {!isLogin && ( - - ورود و ثبت نام - - )} - - شکایات  - -
-
-
-
-
- - - - دانوین - +
+
+
+
+ + + دانوین +
    + {pages.map((page, index) => ( +
  • + + {page.name} + +
  • + ))} +
-
- -
- setSearch(val)} /> - {search && } -
- {isLogin && ( -
- - - - {cartProductsLength} - - - {/* */} - {/* */} - {/* */} + {overLayer && ( +
setOverLayer(false)} + > +
+
e.stopPropagation()} + > + setSearch(val)} /> + {search && } +
+
)} -
-
-
+
setOverLayer(true)} /> - {/* */} - - دسته بندی کالاها    - -
-
- {/* {menuItems.map((item, index) => ( - - {item} - - ))} */} + {isLogin && ( +
+ + + + {cartProductsLength} + + + {/* */} - {pages.map((item, index) => ( + {/* */} +
+ )} + {1 && ( - {item.name} + ورود یا ثبت نام - ))} + )}
@@ -322,7 +278,9 @@ const mapStateToProps = (state) => ({ isMobile: state.publicApi.isMobile, headerOptions: state.publicApi.headerOptions, isLogin: state.user.status, - cartProductsLength: state.userProduct.list?.filter((product) => product.condition < 2)?.length, + cartProductsLength: state.userProduct.list?.filter( + (product) => product.condition < 2 + )?.length, }); const mapDispatchToProps = { @@ -333,18 +291,10 @@ export default connect(mapStateToProps, mapDispatchToProps)(Navbar); Navbar.defaultProps = { pages: [ - { - link: "/", - name: "خانه", - }, { link: "/products", name: "محصولات", }, - { - link: "/filter", - name: "دسته بندی ها", - }, { link: "/contact-us", name: "تماس با ما", diff --git a/src/views/404/index.js b/src/views/404/index.js index a819ffc..28989a5 100644 --- a/src/views/404/index.js +++ b/src/views/404/index.js @@ -9,8 +9,7 @@ function NotFound({ headerOptions, setHeaderOptions }) { }, []); return (

404 -

+

وای!!
صفحه ای که بدنبال آن بوده‌اید دیگر وجود ندارد :( diff --git a/src/views/AR/index.js b/src/views/AR/index.js index 59faa2c..b21450c 100644 --- a/src/views/AR/index.js +++ b/src/views/AR/index.js @@ -12,7 +12,7 @@ function AR({ getArList, arList, headerOptions, setHeaderOptions }) { }, []); return ( -

+
{arList.length > 0 && arList.map((book, index) => )}
diff --git a/src/views/Activation/index.js b/src/views/Activation/index.js index 27bda7b..763e0e0 100644 --- a/src/views/Activation/index.js +++ b/src/views/Activation/index.js @@ -18,8 +18,8 @@ function Activation({ headerOptions, setHeaderOptions, isMobile }) { }, []); return (
diff --git a/src/views/Contact/index.js b/src/views/Contact/index.js index 27f6395..b7877f9 100644 --- a/src/views/Contact/index.js +++ b/src/views/Contact/index.js @@ -48,7 +48,7 @@ function Contact({ headerOptions, setHeaderOptions, info, isMobile, isDark }) { return (
{ },[]); return ( -
+
{/* +
{orders.map((order, index) => ( ))} diff --git a/src/views/Product/index.js b/src/views/Product/index.js index 1d31bd9..8954ea3 100644 --- a/src/views/Product/index.js +++ b/src/views/Product/index.js @@ -187,7 +187,7 @@ export const Product = ({
) : ( -
+
)} diff --git a/src/views/Products/index.js b/src/views/Products/index.js index 4ec5831..e624b30 100644 --- a/src/views/Products/index.js +++ b/src/views/Products/index.js @@ -158,7 +158,7 @@ export const Products = ({ ) : (
diff --git a/src/views/ShoppingCart/index.js b/src/views/ShoppingCart/index.js index b1e15d4..bbb3ef1 100644 --- a/src/views/ShoppingCart/index.js +++ b/src/views/ShoppingCart/index.js @@ -165,7 +165,7 @@ function ShoppingCart({
) : (
diff --git a/src/views/Video/index.js b/src/views/Video/index.js index 1335e04..1a2c5f1 100644 --- a/src/views/Video/index.js +++ b/src/views/Video/index.js @@ -109,7 +109,7 @@ function Video({
) : ( -
+
diff --git a/src/views/VideoDisplay/index.js b/src/views/VideoDisplay/index.js index 31a3e39..6ec506d 100644 --- a/src/views/VideoDisplay/index.js +++ b/src/views/VideoDisplay/index.js @@ -102,7 +102,7 @@ function VideoDisplay({
) : ( -
+