|
|
|
@ -86,56 +86,75 @@ export default function MobileNavbar(props) { |
|
|
|
|
); |
|
|
|
|
if (!status) |
|
|
|
|
return ( |
|
|
|
|
<nav className="mobile-navbar d-flex"> |
|
|
|
|
<nav |
|
|
|
|
className={`mobile-navbar d-flex ${ |
|
|
|
|
window.lang === "en" ? "flex-row-reverse" : "" |
|
|
|
|
}`}
|
|
|
|
|
style={{ width: "100%" }} |
|
|
|
|
> |
|
|
|
|
<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 |
|
|
|
|
className="mobile-navbar__menu" |
|
|
|
|
style={{ marginTop: 10 }} |
|
|
|
|
// style={{ marginTop: 10 }}
|
|
|
|
|
onClick={toggleDrawer("right", true)} |
|
|
|
|
> |
|
|
|
|
<img src={hamburger} alt={window.t("منو")} /> |
|
|
|
|
{/* <Link to="/" className="mobile-navbar__logo2" style={{}}> |
|
|
|
|
<img src={logo} alt={window.t("لوگو")} className="logo" /> |
|
|
|
|
</Link> */} |
|
|
|
|
</div> |
|
|
|
|
<Link to="/" className="mobile-navbar__logo2" style={{}}> |
|
|
|
|
<img src={logo} alt={window.t("لوگو")} className="logo" /> |
|
|
|
|
</Link> |
|
|
|
|
</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" |
|
|
|
|
<div |
|
|
|
|
className={`d-flex align-items-center ${ |
|
|
|
|
window.lang === "en" ? "flex-row-reverse" : "" |
|
|
|
|
}`}
|
|
|
|
|
> |
|
|
|
|
{window.t("ورود یا ثبتنام")} |
|
|
|
|
</Link> |
|
|
|
|
<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, 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} |
|
|
|
|
</div> |
|
|
|
|
<SwipeableDrawer |
|
|
|
|
anchor="right" |
|
|
|
|
anchor={window.lang === "en" ? "left" : "right"} |
|
|
|
|
open={state["right"]} |
|
|
|
|
onClose={toggleDrawer("right", false)} |
|
|
|
|
onOpen={toggleDrawer("right", true)} |
|
|
|
|