|
|
|
@ -43,39 +43,39 @@ const MyDrawer = ({ |
|
|
|
|
const [addUserDropdown, setAddUserDropdown] = useState(false); |
|
|
|
|
const publicLink = [ |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("صفحه اصلی")}`, |
|
|
|
|
name: window.t("صفحه اصلی"), |
|
|
|
|
link: "/", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={homeIcon} |
|
|
|
|
className="opacity-50 dark:bg-white" |
|
|
|
|
alt={`${window.t("صفحه اصلی")}`} |
|
|
|
|
alt={window.t("صفحه اصلی")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
|
message: "", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("ورود یا ثبت نام")}`, |
|
|
|
|
name: window.t("ورود یا ثبت نام"), |
|
|
|
|
link: "/signup", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={logoutIcon} |
|
|
|
|
className="opacity-50 dark:bg-white" |
|
|
|
|
alt={`${window.t("کتابهای من")}`} |
|
|
|
|
alt={window.t("کتابهای من")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
|
message: "", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("پشتیبانی")}`, |
|
|
|
|
name: window.t("پشتیبانی"), |
|
|
|
|
link: "/contact-us", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={dangerIcon} |
|
|
|
|
className="opacity-50 dark:bg-white" |
|
|
|
|
alt={`${window.t("پشتیبانی")}`} |
|
|
|
|
alt={window.t("پشتیبانی")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
@ -84,13 +84,13 @@ const MyDrawer = ({ |
|
|
|
|
]; |
|
|
|
|
const privateLink = [ |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("صفحه اصلی")}`, |
|
|
|
|
name: window.t("صفحه اصلی"), |
|
|
|
|
link: "/", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={isDark ? homeDarkIcon : homeIcon} |
|
|
|
|
className="opacity-50" |
|
|
|
|
alt={`${window.t("صفحه اصلی")}`} |
|
|
|
|
alt={window.t("صفحه اصلی")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
@ -100,13 +100,13 @@ const MyDrawer = ({ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("سبد خرید")}`, |
|
|
|
|
name: window.t("سبد خرید"), |
|
|
|
|
link: "/cart", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={isDark ? cartDarkIcon : cartIcon} |
|
|
|
|
className="opacity-50" |
|
|
|
|
alt={`${window.t("سبد خرید")}`} |
|
|
|
|
alt={window.t("سبد خرید")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
@ -116,13 +116,13 @@ const MyDrawer = ({ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("فعال سازی کتاب")}`, |
|
|
|
|
name: window.t("فعال سازی کتاب"), |
|
|
|
|
link: "/activation", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={isDark ? activationDarkIcon : activationIcon} |
|
|
|
|
className="opacity-50" |
|
|
|
|
alt={`${window.t("فعال سازی کتاب")}`} |
|
|
|
|
alt={window.t("فعال سازی کتاب")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
@ -132,13 +132,13 @@ const MyDrawer = ({ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("واقعیت افزوده")}`, |
|
|
|
|
name: window.t("واقعیت افزوده"), |
|
|
|
|
link: "/ar", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={isDark ? arDarkIcon : arIcon} |
|
|
|
|
className="opacity-50" |
|
|
|
|
alt={`${window.t("واقعیت افزوده")}`} |
|
|
|
|
alt={window.t("واقعیت افزوده")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
@ -148,13 +148,13 @@ const MyDrawer = ({ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("سفارشات")}`, |
|
|
|
|
name: window.t("سفارشات"), |
|
|
|
|
link: "/orders", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={isDark ? ordersDarkIcon : ordersIcon} |
|
|
|
|
className="opacity-50" |
|
|
|
|
alt={`${window.t("سفارشات")}`} |
|
|
|
|
alt={window.t("سفارشات")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
@ -164,13 +164,13 @@ const MyDrawer = ({ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("سوالات متداول")}`, |
|
|
|
|
name: window.t("سوالات متداول"), |
|
|
|
|
link: "/faq", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={isDark ? faqDarkIcon : faqIcon} |
|
|
|
|
className="opacity-50" |
|
|
|
|
alt={`${window.t("سوالات متداول")}`} |
|
|
|
|
alt={window.t("سوالات متداول")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
@ -180,13 +180,13 @@ const MyDrawer = ({ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("پشتیبانی")}`, |
|
|
|
|
name: window.t("پشتیبانی"), |
|
|
|
|
link: "/contact", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={isDark ? contactDarkIcon : contactIcon} |
|
|
|
|
className="opacity-50" |
|
|
|
|
alt={`${window.t("پشتیبانی")}`} |
|
|
|
|
alt={window.t("پشتیبانی")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
@ -196,13 +196,13 @@ const MyDrawer = ({ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: `${window.t("خروج از حساب کاربری")}`, |
|
|
|
|
name: window.t("خروج از حساب کاربری"), |
|
|
|
|
link: "/", |
|
|
|
|
icon: ( |
|
|
|
|
<img |
|
|
|
|
src={isDark ? logoutDarkIcon : logoutIcon} |
|
|
|
|
className="opacity-50" |
|
|
|
|
alt={`${window.t("خروج از حساب کاربری")}`} |
|
|
|
|
alt={window.t("خروج از حساب کاربری")} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
toast: "", |
|
|
|
@ -214,7 +214,7 @@ const MyDrawer = ({ |
|
|
|
|
accept: () => { |
|
|
|
|
logout(); |
|
|
|
|
}, |
|
|
|
|
text:`${window.t("قصد خروج از حساب کاربری رو داری؟")}`, |
|
|
|
|
text: window.t("قصد خروج از حساب کاربری رو داری؟"), |
|
|
|
|
}); |
|
|
|
|
setDrawerOpen(false); |
|
|
|
|
}, |
|
|
|
|