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}
+
+ )}
+
+ )
+ )}