Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Issue#3802 - Team to user switch fixed

Syed Abdullaha645dc7ba5cd
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 8bf748f9b..069989564 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 b57c2ecdc..44496e22e 100644
--- a/src/components/input/NavButton.tsx
+++ b/src/components/input/NavButton.tsx
@@ -93,7 +93,7 @@ export function NavButton({ showText = true }: TeamsButtonProps) {
<Column minWidth="300px">
<Menu selectionMode="single" selectedKeys={selectedKeys}>
<MenuSection title={formatMessage(labels.myAccount)}>
- <MenuItem id="user" href={getUrl('/')}>
+ <MenuItem id="user" href={getUrl('/websites')}>
<IconLabel icon={<User />} label={user.username} />
</MenuItem>
</MenuSection>