list of workspace

This commit is contained in:
hamid zarghami
2026-07-09 10:12:55 +03:30
parent 43dc693061
commit b965dd0a6d
10 changed files with 134 additions and 10 deletions
+11 -3
View File
@@ -1,4 +1,4 @@
import { Add, Category, Task } from "iconsax-react";
import { Task } from "iconsax-react";
import { FC } from "react";
import { useTranslation } from "react-i18next";
import { useLocation } from "react-router-dom";
@@ -9,7 +9,10 @@ const TaskManagerSubMenu: FC = () => {
const { t } = useTranslation("global");
const location = useLocation();
const isWorkspaceActive = location.pathname.startsWith(Pages.taskmanager.workspace);
const isWorkspaceListActive = location.pathname === Pages.taskmanager.workspaceList;
const isKanbanActive =
location.pathname.startsWith(Pages.taskmanager.workspace) &&
!isWorkspaceListActive;
const isCreateWorkspaceActive = location.pathname === Pages.taskmanager.createWorkspace;
const isProjectListActive = location.pathname === Pages.taskmanager.projectList;
const isCreateProjectActive = location.pathname === Pages.taskmanager.createProject;
@@ -22,9 +25,14 @@ const TaskManagerSubMenu: FC = () => {
</div>
<div className="flex flex-col mt-10 gap-4">
<SubMenuItem
title={t("submenu.taskmanager_workspace_list")}
isActive={isWorkspaceListActive}
link={Pages.taskmanager.workspaceList}
/>
<SubMenuItem
title={t("submenu.taskmanager_workspace")}
isActive={isWorkspaceActive}
isActive={isKanbanActive}
link={Pages.taskmanager.workspace + "dpage"}
/>
<SubMenuItem