From ccb9cd5d0adeb3bf820d73b49444cf8411bbd412 Mon Sep 17 00:00:00 2001 From: MananTank Date: Fri, 9 May 2025 11:33:34 +0000 Subject: [PATCH] Dashboard: Fix team links in header on pages outside /team layout (#6981) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR modifies the `href` attribute of the `Link` component in the `TeamSelectionUI.tsx` file to ensure that the URL path is correctly constructed when navigating between team pages. ### Detailed summary - Updated the `href` logic to check if `pathname` starts with `/team`. - Changed the `replace` method to use the full path for `currentTeam.slug` and `team.slug`. - Ensured that the fallback URL for the `Link` defaults to `/team/${team.slug}` when conditions are not met. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../(app)/team/components/TeamHeader/TeamSelectionUI.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx index f78cca1aa59..d916f06036a 100644 --- a/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx +++ b/apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx @@ -93,8 +93,13 @@ export function TeamSelectionUI(props: { >