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