This commit is contained in:
@@ -44,7 +44,7 @@ export const getSubMenuNameFromPath = (pathname: string): string => {
|
||||
}
|
||||
|
||||
if (pathname.startsWith("/workspace") || pathname.startsWith("/project") || pathname.startsWith("/taskmanager")) {
|
||||
return "other";
|
||||
return "users";
|
||||
}
|
||||
|
||||
const segment = pathname.split("/")[1] ?? "";
|
||||
|
||||
@@ -2,8 +2,8 @@ import {
|
||||
Box,
|
||||
Category,
|
||||
DocumentLike,
|
||||
Element3,
|
||||
Headphone,
|
||||
Home,
|
||||
Logout,
|
||||
Money3,
|
||||
Profile,
|
||||
@@ -106,7 +106,7 @@ const SideBar: FC = () => {
|
||||
<div className="text-xs text-[#8C90A3] mt-6">
|
||||
<SideBarItem
|
||||
icon={
|
||||
<Element3
|
||||
<Home
|
||||
variant={isPathActive("dashboard") ? "Bold" : "Outline"}
|
||||
color={isPathActive("dashboard") ? "black" : "#8C90A3"}
|
||||
size={iconSizeSideBar}
|
||||
|
||||
@@ -12,15 +12,6 @@ const OtherSubMenu: FC = () => {
|
||||
|
||||
const isActive = (name: string) => location.pathname.includes(name);
|
||||
|
||||
const isTaskManagerActive =
|
||||
location.pathname.startsWith(Pages.taskmanager.workspace) ||
|
||||
location.pathname === Pages.taskmanager.workspaceList ||
|
||||
location.pathname.startsWith(Pages.taskmanager.updateWorkspace) ||
|
||||
location.pathname === Pages.taskmanager.createWorkspace ||
|
||||
location.pathname === Pages.taskmanager.createProject ||
|
||||
location.pathname.startsWith(Pages.taskmanager.updateProject) ||
|
||||
location.pathname.startsWith(Pages.taskmanager.projectList);
|
||||
|
||||
return (
|
||||
<div className="py-12">
|
||||
<div className="flex gap-3 items-center border-b pb-10 px-6">
|
||||
@@ -79,11 +70,6 @@ const OtherSubMenu: FC = () => {
|
||||
link={Pages.messages.list}
|
||||
activeName="contacts_us"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={t("sidebar.taskmanager")}
|
||||
isActive={isTaskManagerActive}
|
||||
link={Pages.taskmanager.workspaceList}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -11,6 +11,15 @@ const UsersSubMenu: FC = () => {
|
||||
|
||||
const isActive = (name: string) => location.pathname.includes(name);
|
||||
|
||||
const isTaskManagerActive =
|
||||
location.pathname.startsWith(Pages.taskmanager.workspace) ||
|
||||
location.pathname === Pages.taskmanager.workspaceList ||
|
||||
location.pathname.startsWith(Pages.taskmanager.updateWorkspace) ||
|
||||
location.pathname === Pages.taskmanager.createWorkspace ||
|
||||
location.pathname === Pages.taskmanager.createProject ||
|
||||
location.pathname.startsWith(Pages.taskmanager.updateProject) ||
|
||||
location.pathname.startsWith(Pages.taskmanager.projectList);
|
||||
|
||||
return (
|
||||
<div className="py-12">
|
||||
<div className="flex gap-3 items-center border-b pb-10 px-6">
|
||||
@@ -41,6 +50,11 @@ const UsersSubMenu: FC = () => {
|
||||
link={Pages.users.groupList}
|
||||
activeName="admins"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={t("sidebar.taskmanager")}
|
||||
isActive={isTaskManagerActive}
|
||||
link={Pages.taskmanager.workspaceList}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user