|
|
@ -86,56 +86,75 @@ export default function MobileNavbar(props) { |
|
|
|
); |
|
|
|
); |
|
|
|
if (!status) |
|
|
|
if (!status) |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<nav className="mobile-navbar d-flex"> |
|
|
|
<nav |
|
|
|
|
|
|
|
className={`mobile-navbar d-flex ${ |
|
|
|
|
|
|
|
window.lang === "en" ? "flex-row-reverse" : "" |
|
|
|
|
|
|
|
}`}
|
|
|
|
|
|
|
|
style={{ width: "100%" }} |
|
|
|
|
|
|
|
> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={`d-flex ${window.lang === "en" ? "flex-row-reverse" : ""}`} |
|
|
|
className={`d-flex justify-content-between align-items-center ${ |
|
|
|
|
|
|
|
window.lang === "en" ? "flex-row-reverse" : "" |
|
|
|
|
|
|
|
}`}
|
|
|
|
|
|
|
|
style={{ width: "100%" }} |
|
|
|
> |
|
|
|
> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="mobile-navbar__menu" |
|
|
|
className="mobile-navbar__menu" |
|
|
|
style={{ marginTop: 10 }} |
|
|
|
// style={{ marginTop: 10 }}
|
|
|
|
onClick={toggleDrawer("right", true)} |
|
|
|
onClick={toggleDrawer("right", true)} |
|
|
|
> |
|
|
|
> |
|
|
|
<img src={hamburger} alt={window.t("منو")} /> |
|
|
|
<img src={hamburger} alt={window.t("منو")} /> |
|
|
|
|
|
|
|
{/* <Link to="/" className="mobile-navbar__logo2" style={{}}> |
|
|
|
|
|
|
|
<img src={logo} alt={window.t("لوگو")} className="logo" /> |
|
|
|
|
|
|
|
</Link> */} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Link to="/" className="mobile-navbar__logo2" style={{}}> |
|
|
|
<div |
|
|
|
<img src={logo} alt={window.t("لوگو")} className="logo" /> |
|
|
|
className={`d-flex align-items-center ${ |
|
|
|
</Link> |
|
|
|
window.lang === "en" ? "flex-row-reverse" : "" |
|
|
|
</div> |
|
|
|
}`}
|
|
|
|
<div className="mobile-navbar__left d-flex" style={{ marginLeft: 10 }}> |
|
|
|
|
|
|
|
<select |
|
|
|
|
|
|
|
className="language-select" |
|
|
|
|
|
|
|
onChange={(e) => { |
|
|
|
|
|
|
|
window.localStorage.setItem("language", e.target.value); |
|
|
|
|
|
|
|
window.location.reload(); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{[ |
|
|
|
|
|
|
|
{ key: "فارسی", lang: "fa", default: true }, |
|
|
|
|
|
|
|
{ key: "English", lang: "en" }, |
|
|
|
|
|
|
|
{ key: "العربیه", lang: "ar" }, |
|
|
|
|
|
|
|
].map((el, index) => ( |
|
|
|
|
|
|
|
<option |
|
|
|
|
|
|
|
key={el.lang} |
|
|
|
|
|
|
|
value={el.lang} |
|
|
|
|
|
|
|
selected={ |
|
|
|
|
|
|
|
(!window.lang && el.default) || el.lang == window.lang |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{el.key} |
|
|
|
|
|
|
|
</option> |
|
|
|
|
|
|
|
))} |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<Link |
|
|
|
|
|
|
|
style={{ fontSize: 12 }} |
|
|
|
|
|
|
|
to={"/auth"} |
|
|
|
|
|
|
|
className="mobile-navbar__signup" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
{window.t("ورود یا ثبتنام")} |
|
|
|
<select |
|
|
|
</Link> |
|
|
|
className="language-select" |
|
|
|
|
|
|
|
onChange={(e) => { |
|
|
|
|
|
|
|
window.localStorage.setItem("language", e.target.value); |
|
|
|
|
|
|
|
window.location.reload(); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{[ |
|
|
|
|
|
|
|
{ key: "فارسی", lang: "fa", default: true }, |
|
|
|
|
|
|
|
{ key: "English", lang: "en" }, |
|
|
|
|
|
|
|
{ key: "العربیه", lang: "ar" }, |
|
|
|
|
|
|
|
].map((el, index) => ( |
|
|
|
|
|
|
|
<option |
|
|
|
|
|
|
|
key={el.lang} |
|
|
|
|
|
|
|
value={el.lang} |
|
|
|
|
|
|
|
selected={ |
|
|
|
|
|
|
|
(!window.lang && el.default) || el.lang == window.lang |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{el.key} |
|
|
|
|
|
|
|
</option> |
|
|
|
|
|
|
|
))} |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<Link |
|
|
|
|
|
|
|
style={{ fontSize: 12, padding: "8px 5px" }} |
|
|
|
|
|
|
|
to={"/auth"} |
|
|
|
|
|
|
|
className="mobile-navbar__signup" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{window.t("ورود یا ثبتنام")} |
|
|
|
|
|
|
|
</Link> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
className={`mobile-navbar__left d-flex ${ |
|
|
|
|
|
|
|
window.lang === "en" ? "flex-row-reverse" : "" |
|
|
|
|
|
|
|
}`}
|
|
|
|
|
|
|
|
style={{ marginLeft: 10 }} |
|
|
|
|
|
|
|
> |
|
|
|
{page !== "home" ? <BackButton /> : null} |
|
|
|
{page !== "home" ? <BackButton /> : null} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<SwipeableDrawer |
|
|
|
<SwipeableDrawer |
|
|
|
anchor="right" |
|
|
|
anchor={window.lang === "en" ? "left" : "right"} |
|
|
|
open={state["right"]} |
|
|
|
open={state["right"]} |
|
|
|
onClose={toggleDrawer("right", false)} |
|
|
|
onClose={toggleDrawer("right", false)} |
|
|
|
onOpen={toggleDrawer("right", true)} |
|
|
|
onOpen={toggleDrawer("right", true)} |
|
|
|