From 042384df909058006d8e9706d75c57f81b99eb96 Mon Sep 17 00:00:00 2001 From: amir hosein gorji Date: Thu, 2 Jun 2022 17:35:50 +0430 Subject: [PATCH] update public/index.html, AppRouter.js, src/views/Home/Navbar/Laptop/index.js and src/views/Home/Navbar/Laptop/index.scss --- public/index.html | 150 +++++++++++------------- src/AppRouter.js | 2 +- src/views/Home/Navbar/Laptop/index.js | 52 +++++++- src/views/Home/Navbar/Laptop/index.scss | 11 +- 4 files changed, 123 insertions(+), 92 deletions(-) diff --git a/public/index.html b/public/index.html index d375750..d5e1b1b 100644 --- a/public/index.html +++ b/public/index.html @@ -1,85 +1,75 @@ - - - - - - - - - - - - دانوین - - - - - - + دانوین + + + + - - + (function (w, d, s, l, i) { + w[l] = w[l] || []; + w[l].push({ + "gtm.start": new Date().getTime(), + event: "gtm.js", + }); + var f = d.getElementsByTagName(s)[0], + j = d.createElement(s), + dl = l != "dataLayer" ? "&l=" + l : ""; + j.async = true; + j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl; + f.parentNode.insertBefore(j, f); + })(window, document, "script", "dataLayer", "GTM-WVV8H9L"); + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/src/AppRouter.js b/src/AppRouter.js index 1bed7c7..b9b79ba 100644 --- a/src/AppRouter.js +++ b/src/AppRouter.js @@ -218,7 +218,7 @@ class AppRouter extends Component { )} - {mobile ? status ? : null : null} + {status ? : null} {mobile ? ( diff --git a/src/views/Home/Navbar/Laptop/index.js b/src/views/Home/Navbar/Laptop/index.js index 1d839b3..a5c2056 100644 --- a/src/views/Home/Navbar/Laptop/index.js +++ b/src/views/Home/Navbar/Laptop/index.js @@ -129,9 +129,29 @@ class LaptopNavbar extends Component { {window.t("خروج")}{" "} - { + window.localStorage.setItem("language", e.target.value); + window.location.reload(); + }} + > + {console.log(window.lang)} + + {[ + { key: "فارسی", lang: "fa", default: true }, + { key: "English", lang: "en" }, + { key: "العربیه", lang: "ar" }, + ].map((el, index) => ( + ))}
) : (
- { + window.localStorage.setItem("language", e.target.value); + window.location.reload(); + }} + value={window.lang} + > + {console.log(window.lang)} + {[ + { key: "فارسی", lang: "fa", default: true }, + { key: "English", lang: "en" }, + { key: "العربیه", lang: "ar" }, + ].map((el, index) => ( + ))}