diff --git a/web/components/project/sidebar-list-item.tsx b/web/components/project/sidebar-list-item.tsx index 4ed1bf2c4..56cc6130d 100644 --- a/web/components/project/sidebar-list-item.tsx +++ b/web/components/project/sidebar-list-item.tsx @@ -253,32 +253,31 @@ export const ProjectSidebarListItem: React.FC = observer((props) => { )} {project.archive_in > 0 && ( - router.push(`/${workspaceSlug}/projects/${project?.id}/archived-issues/`)} - > -
- - Archived Issues -
+ + +
+ + Archived Issues +
+
)} - router.push(`/${workspaceSlug}/projects/${project?.id}/draft-issues`)} - > -
- - Draft Issues -
+ + +
+ + Draft Issues +
+
- router.push(`/${workspaceSlug}/projects/${project?.id}/settings`)} - > -
- - Settings -
+ + +
+ + Settings +
+
- {/* leave project */} {isViewerOrGuest && ( diff --git a/web/components/workspace/issues-stats.tsx b/web/components/workspace/issues-stats.tsx index 1fa5cf2df..b8cc8432f 100644 --- a/web/components/workspace/issues-stats.tsx +++ b/web/components/workspace/issues-stats.tsx @@ -7,6 +7,7 @@ import { Info } from "lucide-react"; // types import { IUserWorkspaceDashboard } from "types"; import { useRouter } from "next/router"; +import Link from "next/link"; type Props = { data: IUserWorkspaceDashboard | undefined; @@ -19,61 +20,40 @@ export const IssuesStats: React.FC = ({ data }) => {
-
-

Issues assigned to you

-
- {data ? ( -
router.push(`/${workspaceSlug}/workspace-views/assigned`)} - > - {data.assigned_issues_count} -
- ) : ( - - - - )} -
-
-
-

Pending issues

-
- {data ? ( - data.pending_issues_count - ) : ( - - - - )} -
-
+ +
+

Issues assigned to you

+
+
{data?.assigned_issues_count}
+
+
+ + +
+

Pending issues

+
{data?.pending_issues_count}
+
+
-
-

Completed issues

-
- {data ? ( - data.completed_issues_count - ) : ( - - - - )} -
-
-
-

Issues due by this week

-
- {data ? ( - data.issues_due_week_count - ) : ( - - - - )} -
-
+ +
+

Completed issues

+
{data?.completed_issues_count}
+
+ + +
+

Issues due by this week

+
{data?.issues_due_week_count}
+
+
diff --git a/web/components/workspace/sidebar-dropdown.tsx b/web/components/workspace/sidebar-dropdown.tsx index 8d1cfa27d..cc3c878e4 100644 --- a/web/components/workspace/sidebar-dropdown.tsx +++ b/web/components/workspace/sidebar-dropdown.tsx @@ -16,7 +16,7 @@ import { Avatar, Loader } from "@plane/ui"; import { IWorkspace } from "types"; // Static Data -const userLinks = (workspaceSlug: string, userId: string) => [ +const WORKSPACE_DROPDOWN_ITEMS = (workspaceSlug: string, userId: string) => [ { name: "Workspace Settings", href: `/${workspaceSlug}/settings`, @@ -155,8 +155,8 @@ export const WorkspaceSidebarDropdown = observer(() => { workspaces.map((workspace: IWorkspace) => ( {() => ( - + )} )) @@ -198,17 +198,19 @@ export const WorkspaceSidebarDropdown = observer(() => {

No workspace found!

)}
- { - setTrackElement("APP_SIEDEBAR_WORKSPACE_DROPDOWN"); - router.push("/create-workspace"); - }} - className="flex w-full items-center gap-2 px-2 py-1 text-sm text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-80" - > - - Create Workspace + + {() => ( + { + setTrackElement("APP_SIEDEBAR_WORKSPACE_DROPDOWN"); + }} + > + + Create Workspace + + )}
@@ -222,18 +224,20 @@ export const WorkspaceSidebarDropdown = observer(() => { )}
- {userLinks(workspaceSlug?.toString() ?? "", currentUser?.id ?? "").map((link, index) => ( - { - router.push(link.href); - }} - className="flex w-full cursor-pointer items-center justify-start rounded px-2 py-1 text-sm text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-80" - > - {link.name} - - ))} + {WORKSPACE_DROPDOWN_ITEMS(workspaceSlug?.toString() ?? "", currentUser?.id ?? "").map( + (link, index) => ( + + {() => ( + + {link.name} + + )} + + ) + )}