mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Should not redirect if already on the right team.
This commit is contained in:
parent
4af275a7ab
commit
c6fd20974d
@ -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…
x
Reference in New Issue
Block a user