diff --git a/lib/menus.ts b/lib/menus.ts index 2f0c4656..b2b4c5eb 100644 --- a/lib/menus.ts +++ b/lib/menus.ts @@ -2818,20 +2818,24 @@ export function getMenuList(pathname: string, t: any): Group[] { }, ], }, - { - groupLabel: "", - id: "blog", - menus: [ - { - id: "blog", - href: "/contributor/blog", - label: t("blog"), - active: pathname.includes("/blog"), - icon: "fluent:clipboard-text-32-regular", - submenus: [], - }, - ], - }, + ...(!hideForRole3 + ? [ + { + groupLabel: "", + id: "blog", + menus: [ + { + id: "blog", + href: "/contributor/blog", + label: t("blog"), + active: pathname.includes("/blog"), + icon: "fluent:clipboard-text-32-regular", + submenus: [], + }, + ], + }, + ] + : []), { groupLabel: "", id: "curatedcontent", @@ -2874,42 +2878,46 @@ export function getMenuList(pathname: string, t: any): Group[] { }, ], }, - { - groupLabel: "", - id: "settings", - menus: [ - { - id: "settings", - href: "/admin/settings", - label: t("settings"), - active: pathname.includes("/settinng"), - icon: "material-symbols:settings", - submenus: [ - { - href: "/admin/settings/banner", - label: "Banner", - active: pathname === "/admin/settings/banner", - icon: "heroicons:arrow-trending-up", - children: [], - }, - { - href: "/admin/settings/popup", - label: "Pop Up", - active: pathname === "/admin/settings/popup", - icon: "heroicons:arrow-trending-up", - children: [], - }, - { - href: "/admin/settings/iklan", - label: "Iklan", - active: pathname === "/admin/settings/iklan", - icon: "heroicons:arrow-trending-up", - children: [], - }, - ], - }, - ], - }, + ...(!hideForRole3 + ? [ + { + groupLabel: "", + id: "settings", + menus: [ + { + id: "settings", + href: "/admin/settings", + label: t("settings"), + active: pathname.includes("/settinng"), + icon: "material-symbols:settings", + submenus: [ + { + href: "/admin/settings/banner", + label: "Banner", + active: pathname === "/admin/settings/banner", + icon: "heroicons:arrow-trending-up", + children: [], + }, + { + href: "/admin/settings/popup", + label: "Pop Up", + active: pathname === "/admin/settings/popup", + icon: "heroicons:arrow-trending-up", + children: [], + }, + { + href: "/admin/settings/iklan", + label: "Iklan", + active: pathname === "/admin/settings/iklan", + icon: "heroicons:arrow-trending-up", + children: [], + }, + ], + }, + ], + }, + ] + : []), ]; } else if (Number(userParentLevelId) == 761) { menusSelected = [