mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
Should not redirect if already on the right team.
This commit is contained in:
parent
4af275a7ab
commit
c6fd20974d
1 changed files with 4 additions and 6 deletions
|
|
@ -86,12 +86,10 @@ export function NavBar() {
|
||||||
if (!cloudMode) {
|
if (!cloudMode) {
|
||||||
const teamIdLocal = getItem('umami.team')?.id;
|
const teamIdLocal = getItem('umami.team')?.id;
|
||||||
|
|
||||||
if (teamIdLocal && pathname !== '/' && pathname !== '/dashboard') {
|
if (teamIdLocal && teamIdLocal !== teamId) {
|
||||||
const url = '/';
|
router.push(
|
||||||
router.push(url);
|
pathname !== '/' && pathname !== '/dashboard' ? '/' : `/teams/${teamIdLocal}/dashboard`,
|
||||||
} else if (teamIdLocal) {
|
);
|
||||||
const url = `/teams/${teamIdLocal}/dashboard`;
|
|
||||||
router.push(url);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [cloudMode]);
|
}, [cloudMode]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue