|
|
@ -1,10 +1,13 @@ |
|
|
|
import React, { useState, Component } from "react"; |
|
|
|
import React, { useState, Component } from "react"; |
|
|
|
|
|
|
|
import { Link } from "react-router-dom"; |
|
|
|
import { makeStyles } from "@material-ui/core/styles"; |
|
|
|
import { makeStyles } from "@material-ui/core/styles"; |
|
|
|
import { SwipeableDrawer } from "@material-ui/core"; |
|
|
|
import { SwipeableDrawer } from "@material-ui/core"; |
|
|
|
import NavbarDrawer from "./NavbarDrawer/NavbarDrawer.js"; |
|
|
|
import NavbarDrawer from "./NavbarDrawer/NavbarDrawer.js"; |
|
|
|
import clsx from "clsx"; |
|
|
|
import clsx from "clsx"; |
|
|
|
|
|
|
|
|
|
|
|
import logo from "../../../../assets/icons/logoMobile.png"; |
|
|
|
import logo from "../../../../assets/icons/logoMobile.png"; |
|
|
|
|
|
|
|
import ar from "../../../../assets/icons/ar.png"; |
|
|
|
|
|
|
|
import qr from "../../../../assets/icons/qr.png"; |
|
|
|
import hamburger from "../../../../assets/icons/hamburger.png"; |
|
|
|
import hamburger from "../../../../assets/icons/hamburger.png"; |
|
|
|
import search from "../../../../assets/icons/navbarSearch.png"; |
|
|
|
import search from "../../../../assets/icons/navbarSearch.png"; |
|
|
|
|
|
|
|
|
|
|
@ -30,6 +33,7 @@ export default function MobileNavbar(props) { |
|
|
|
right: false, |
|
|
|
right: false, |
|
|
|
searchFlag: false, |
|
|
|
searchFlag: false, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
const { page } = props; |
|
|
|
|
|
|
|
|
|
|
|
const toggleDrawer = (anchor, open) => (event) => { |
|
|
|
const toggleDrawer = (anchor, open) => (event) => { |
|
|
|
if ( |
|
|
|
if ( |
|
|
@ -49,7 +53,6 @@ export default function MobileNavbar(props) { |
|
|
|
[classes.fullList]: anchor === "top" || anchor === "bottom", |
|
|
|
[classes.fullList]: anchor === "top" || anchor === "bottom", |
|
|
|
})} |
|
|
|
})} |
|
|
|
role="presentation" |
|
|
|
role="presentation" |
|
|
|
|
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<NavbarDrawer |
|
|
|
<NavbarDrawer |
|
|
|
setShare={props.setShare} |
|
|
|
setShare={props.setShare} |
|
|
@ -67,11 +70,26 @@ export default function MobileNavbar(props) { |
|
|
|
> |
|
|
|
> |
|
|
|
<img src={hamburger} alt="منو" /> |
|
|
|
<img src={hamburger} alt="منو" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="mobile-navbar__logo"> |
|
|
|
<div |
|
|
|
|
|
|
|
className="mobile-navbar__logo" |
|
|
|
|
|
|
|
style={{ transform: page !== "home" ? "translateX(-29px)" : "none" }} |
|
|
|
|
|
|
|
> |
|
|
|
<img src={logo} alt="لوگو" /> |
|
|
|
<img src={logo} alt="لوگو" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="mobile-navbar__left"> |
|
|
|
<div className="mobile-navbar__left"> |
|
|
|
|
|
|
|
{page === "home" ? ( |
|
|
|
<img src={search} alt="جستجو" /> |
|
|
|
<img src={search} alt="جستجو" /> |
|
|
|
|
|
|
|
) : ( |
|
|
|
|
|
|
|
<div className="d-flex align-items-center"> |
|
|
|
|
|
|
|
<img src={search} alt="جستجو" /> |
|
|
|
|
|
|
|
<Link to={"/qr-scan"}> |
|
|
|
|
|
|
|
<img src={qr} alt="QR" /> |
|
|
|
|
|
|
|
</Link> |
|
|
|
|
|
|
|
<Link to={"/ar"}> |
|
|
|
|
|
|
|
<img src={ar} alt="AR" /> |
|
|
|
|
|
|
|
</Link> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<SwipeableDrawer |
|
|
|
<SwipeableDrawer |
|
|
|
anchor="right" |
|
|
|
anchor="right" |
|
|
|