|
|
@ -67,6 +67,7 @@ function Navbar({ |
|
|
|
getCartProducts(); |
|
|
|
getCartProducts(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, [isLogin]); |
|
|
|
}, [isLogin]); |
|
|
|
|
|
|
|
|
|
|
|
return isMobile ? ( |
|
|
|
return isMobile ? ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={_.join( |
|
|
|
className={_.join( |
|
|
@ -80,9 +81,9 @@ function Navbar({ |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{/* landscape start */} |
|
|
|
{/* landscape start */} |
|
|
|
|
|
|
|
|
|
|
|
{/* landscape end */} |
|
|
|
{/* landscape end */} |
|
|
|
{/* portrait start */} |
|
|
|
{/* portrait start */} |
|
|
|
|
|
|
|
|
|
|
|
<div className="w-full h-full relative flex flex-row items-center justify-between lg:hidden py-3 px-4"> |
|
|
|
<div className="w-full h-full relative flex flex-row items-center justify-between lg:hidden py-3 px-4"> |
|
|
|
<div className="relative"> |
|
|
|
<div className="relative"> |
|
|
|
{hamburgerMenu && ( |
|
|
|
{hamburgerMenu && ( |
|
|
@ -96,6 +97,7 @@ function Navbar({ |
|
|
|
/> |
|
|
|
/> |
|
|
|
</> |
|
|
|
</> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
{!title && back ? ( |
|
|
|
{!title && back ? ( |
|
|
|
<img |
|
|
|
<img |
|
|
|
src={isDark ? arrowWhiteIcon : arrowBlueIcon} |
|
|
|
src={isDark ? arrowWhiteIcon : arrowBlueIcon} |
|
|
@ -191,6 +193,7 @@ function Navbar({ |
|
|
|
) : null} |
|
|
|
) : null} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<Drawer drawerOpen={drawerOpen} setDrawerOpen={setDrawerOpen} /> |
|
|
|
<Drawer drawerOpen={drawerOpen} setDrawerOpen={setDrawerOpen} /> |
|
|
|
{/* portrait end */} |
|
|
|
{/* portrait end */} |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -206,9 +209,14 @@ function Navbar({ |
|
|
|
to="/" |
|
|
|
to="/" |
|
|
|
className="flex flex-row items-center text-2xl font-black text-green7B" |
|
|
|
className="flex flex-row items-center text-2xl font-black text-green7B" |
|
|
|
> |
|
|
|
> |
|
|
|
<img src={logoIcon} className="w-8 relative bottom-1 ml-1" /> |
|
|
|
<img |
|
|
|
|
|
|
|
src={logoIcon} |
|
|
|
|
|
|
|
className="w-8 relative bottom-1 ml-1" |
|
|
|
|
|
|
|
alt="" |
|
|
|
|
|
|
|
/> |
|
|
|
{window.t("دانوین")} |
|
|
|
{window.t("دانوین")} |
|
|
|
</Link> |
|
|
|
</Link> |
|
|
|
|
|
|
|
|
|
|
|
<ul className="flex flex-row list-none items-center relative top-0.5 mr-6"> |
|
|
|
<ul className="flex flex-row list-none items-center relative top-0.5 mr-6"> |
|
|
|
{pages.map((page, index) => ( |
|
|
|
{pages.map((page, index) => ( |
|
|
|
<li key={index}> |
|
|
|
<li key={index}> |
|
|
@ -222,6 +230,7 @@ function Navbar({ |
|
|
|
))} |
|
|
|
))} |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
{overLayer && ( |
|
|
|
{overLayer && ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="z-30 w-screen h-full fixed top-0 right-0 backdrop-filter blur-sm bg-opacity-60 bg-gray-600" |
|
|
|
className="z-30 w-screen h-full fixed top-0 right-0 backdrop-filter blur-sm bg-opacity-60 bg-gray-600" |
|
|
@ -254,12 +263,14 @@ function Navbar({ |
|
|
|
</option> |
|
|
|
</option> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<img |
|
|
|
<img |
|
|
|
src={searchIcon} |
|
|
|
src={searchIcon} |
|
|
|
alt="" |
|
|
|
alt="" |
|
|
|
className="w-7 ml-3 cursor-pointer" |
|
|
|
className="w-7 ml-3 cursor-pointer" |
|
|
|
onClick={() => setOverLayer(true)} |
|
|
|
onClick={() => setOverLayer(true)} |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
{isLogin && ( |
|
|
|
{isLogin && ( |
|
|
|
<div className="flex justify-end items-center gap-4"> |
|
|
|
<div className="flex justify-end items-center gap-4"> |
|
|
|
<Link to="/cart" className="relative"> |
|
|
|
<Link to="/cart" className="relative"> |
|
|
@ -273,6 +284,7 @@ function Navbar({ |
|
|
|
{/* <img src={profileIcon} alt="" className="w-5 h-5" /> */} |
|
|
|
{/* <img src={profileIcon} alt="" className="w-5 h-5" /> */} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
{!isLogin ? ( |
|
|
|
{!isLogin ? ( |
|
|
|
<Link |
|
|
|
<Link |
|
|
|
to="/signup" |
|
|
|
to="/signup" |
|
|
@ -331,6 +343,7 @@ Navbar.defaultProps = { |
|
|
|
name: window.t("مجله دانوین"), |
|
|
|
name: window.t("مجله دانوین"), |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
logo: true, |
|
|
|
logo: true, |
|
|
|
hamburgerMenu: true, |
|
|
|
hamburgerMenu: true, |
|
|
|
qr: true, |
|
|
|
qr: true, |
|
|
@ -339,6 +352,7 @@ Navbar.defaultProps = { |
|
|
|
border: "border", |
|
|
|
border: "border", |
|
|
|
topHeader: true, |
|
|
|
topHeader: true, |
|
|
|
bottomHeader: true, |
|
|
|
bottomHeader: true, |
|
|
|
|
|
|
|
|
|
|
|
menuItems: [ |
|
|
|
menuItems: [ |
|
|
|
`${window.t("محصولات")}`, |
|
|
|
`${window.t("محصولات")}`, |
|
|
|
`${window.t("دسته بندی")}`, |
|
|
|
`${window.t("دسته بندی")}`, |
|
|
@ -347,6 +361,7 @@ Navbar.defaultProps = { |
|
|
|
`${window.t("پیگیری")}`, |
|
|
|
`${window.t("پیگیری")}`, |
|
|
|
`${window.t("وبلاگ")}`, |
|
|
|
`${window.t("وبلاگ")}`, |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
category: true, |
|
|
|
category: true, |
|
|
|
searchBox: true, |
|
|
|
searchBox: true, |
|
|
|
// icons
|
|
|
|
// icons
|
|
|
|