From a645dc7ba5cd37ef75498aec1f84f13a6fdcf190 Mon Sep 17 00:00:00 2001 From: Syed Abdullah <2syedabdullah@gmail.com> Date: Fri, 28 Nov 2025 06:10:19 +0000 Subject: [PATCH 1/2] Issue#3802 - Team to user switch fixed --- src/app/page.tsx | 8 +++----- src/components/input/NavButton.tsx | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 8bf748f9..06998956 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,7 +1,7 @@ 'use client'; import { useEffect } from 'react'; import { redirect } from 'next/navigation'; -import { getItem, removeItem } from '@/lib/storage'; +import { getItem } from '@/lib/storage'; import { LAST_TEAM_CONFIG } from '@/lib/constants'; export default function RootPage() { @@ -10,11 +10,9 @@ export default function RootPage() { if (lastTeam) { redirect(`/teams/${lastTeam}/websites`); - } else { - removeItem(LAST_TEAM_CONFIG); - - redirect(`/websites`); } + + redirect(`/websites`); }, []); return null; diff --git a/src/components/input/NavButton.tsx b/src/components/input/NavButton.tsx index b57c2ecd..44496e22 100644 --- a/src/components/input/NavButton.tsx +++ b/src/components/input/NavButton.tsx @@ -93,7 +93,7 @@ export function NavButton({ showText = true }: TeamsButtonProps) { - + } label={user.username} /> From 50bfee33284e716a888298078a03ca3f656c2bbd Mon Sep 17 00:00:00 2001 From: Syed Abdullah <2syedabdullah@gmail.com> Date: Fri, 28 Nov 2025 06:30:22 +0000 Subject: [PATCH 2/2] Moved the redirect to else statement --- src/app/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 06998956..22f6bc84 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -10,9 +10,9 @@ export default function RootPage() { if (lastTeam) { redirect(`/teams/${lastTeam}/websites`); + } else { + redirect(`/websites`); } - - redirect(`/websites`); }, []); return null;