update src/components/Navbar/index.js

temp
mahdi 2 years ago
parent 5ab9a3e8ee
commit 5ab7ae8b0d
  1. 28
      src/components/Navbar/index.js

@ -62,7 +62,7 @@ function Navbar({
useEffect(() => { useEffect(() => {
if (!isMobile && isLogin) { if (!isMobile && isLogin) {
console.log(111) console.log(111);
getCartProducts(); getCartProducts();
} }
}, [isLogin]); }, [isLogin]);
@ -206,7 +206,7 @@ function Navbar({
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" />
دانوین {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) => (
@ -264,14 +264,14 @@ function Navbar({
to="/signup" to="/signup"
className="bg-blueC0 font-semibold text-white rounded-md px-4 py-3 text-sm mr-7 hover:bg-opacity-90 shadow-sm" className="bg-blueC0 font-semibold text-white rounded-md px-4 py-3 text-sm mr-7 hover:bg-opacity-90 shadow-sm"
> >
ورود یا ثبت نام {window.t("ورود یا ثبت نام")}
</Link> </Link>
) : ( ) : (
<Link <Link
to="/dashboard" to="/dashboard"
className="bg-blueC0 font-semibold text-white rounded-md px-4 py-3 text-sm mr-7 hover:bg-opacity-90 shadow-sm" className="bg-blueC0 font-semibold text-white rounded-md px-4 py-3 text-sm mr-7 hover:bg-opacity-90 shadow-sm"
> >
حساب کاربری {window.t("حساب کاربری")}
</Link> </Link>
)} )}
</div> </div>
@ -302,19 +302,19 @@ Navbar.defaultProps = {
pages: [ pages: [
{ {
link: "/products", link: "/products",
name: "فروشگاه", name: `${window.t("فروشگاه")}`,
}, },
{ {
link: "/contact-us", link: "/contact-us",
name: "تماس با ما", name: `${window.t("تماس با ما")}`,
}, },
{ {
link: "/about-us", link: "/about-us",
name: "درباره دانوین", name: `${window.t("درباره دانوین")}`,
}, },
{ {
link: "/blogs", link: "/blogs",
name: "مجله دانوین", name: `${window.t("مجله دانوین")}`,
}, },
], ],
logo: true, logo: true,
@ -326,12 +326,12 @@ Navbar.defaultProps = {
topHeader: true, topHeader: true,
bottomHeader: true, bottomHeader: true,
menuItems: [ menuItems: [
"محصولات", `${window.t("محصولات")}`,
"دسته بندی", `${window.t("دسته بندی")}`,
"تماس با ما", `${window.t("تماس با ما")}`,
"درباره ما", `${window.t("درباره ما")}`,
"پیگیری", `${window.t("پیگیری")}`,
"وبلاگ", `${window.t("وبلاگ")}`,
], ],
category: true, category: true,
searchBox: true, searchBox: true,

Loading…
Cancel
Save