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) {
|
||||
const teamIdLocal = getItem('umami.team')?.id;
|
||||
|
||||
if (teamIdLocal && pathname !== '/' && pathname !== '/dashboard') {
|
||||
const url = '/';
|
||||
router.push(url);
|
||||
} else if (teamIdLocal) {
|
||||
const url = `/teams/${teamIdLocal}/dashboard`;
|
||||
router.push(url);
|
||||
if (teamIdLocal && teamIdLocal !== teamId) {
|
||||
router.push(
|
||||
pathname !== '/' && pathname !== '/dashboard' ? '/' : `/teams/${teamIdLocal}/dashboard`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}, [cloudMode]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user