mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +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) {
|
||||
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…
Add table
Add a link
Reference in a new issue