From 48bd62b9d5ec6cda602d1f8b44c428d78c358610 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia Date: Thu, 4 Dec 2025 20:20:57 +0530 Subject: [PATCH 1/2] chore: user menu code refactor --- .../workspace/sidebar/user-menu-root.tsx | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/apps/web/core/components/workspace/sidebar/user-menu-root.tsx b/apps/web/core/components/workspace/sidebar/user-menu-root.tsx index 6cb7e8813b7..ae412573256 100644 --- a/apps/web/core/components/workspace/sidebar/user-menu-root.tsx +++ b/apps/web/core/components/workspace/sidebar/user-menu-root.tsx @@ -1,7 +1,6 @@ import { useState, useEffect } from "react"; import { observer } from "mobx-react"; -import Link from "next/link"; -import { useParams } from "next/navigation"; +import { useParams, useRouter } from "next/navigation"; // icons import { LogOut, Settings, Settings2 } from "lucide-react"; // plane imports @@ -22,6 +21,8 @@ type Props = { export const UserMenuRoot = observer(function UserMenuRoot(props: Props) { const { size = "sm" } = props; const { workspaceSlug } = useParams(); + // router + const router = useRouter(); // store hooks const { toggleAnySidebarDropdown } = useAppTheme(); const { data: currentUser } = useUser(); @@ -76,22 +77,18 @@ export const UserMenuRoot = observer(function UserMenuRoot(props: Props) { >
{currentUser?.email} - - -
- - {t("settings")} -
-
- - - -
- - Preferences -
-
- + router.push(`/${workspaceSlug}/settings/account`)}> +
+ + {t("settings")} +
+
+ router.push(`/${workspaceSlug}/settings/account/preferences`)}> +
+ + Preferences +
+
@@ -110,13 +107,11 @@ export const UserMenuRoot = observer(function UserMenuRoot(props: Props) { <>
- - -
- {t("enter_god_mode")} -
-
- + router.push(GOD_MODE_URL)}> +
+ {t("enter_god_mode")} +
+
)} From 633d9934ca40b13500705d260624ad58adb7b477 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia Date: Thu, 4 Dec 2025 20:22:04 +0530 Subject: [PATCH 2/2] chore: CustomizeNavigationDialog enhancements --- .../components/navigation/customize-navigation-dialog.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/core/components/navigation/customize-navigation-dialog.tsx b/apps/web/core/components/navigation/customize-navigation-dialog.tsx index a44a88cb351..1d1bf048d1b 100644 --- a/apps/web/core/components/navigation/customize-navigation-dialog.tsx +++ b/apps/web/core/components/navigation/customize-navigation-dialog.tsx @@ -259,14 +259,14 @@ export const CustomizeNavigationDialog: FC = ob
{/* Navigation Mode Radio Buttons */}
-