mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Update redirects for teams.
This commit is contained in:
parent
1955166bdf
commit
f01073c46a
4 changed files with 26 additions and 7 deletions
|
|
@ -10,10 +10,11 @@ export function TeamsButton({ teamId }: { teamId: string }) {
|
|||
const { formatMessage, labels } = useMessages();
|
||||
const { router } = useNavigation();
|
||||
const team = user?.teams?.find(({ id }) => id === teamId);
|
||||
const cloudMode = !!process.env.cloudMode;
|
||||
|
||||
const handleSelect = (close: () => void, id: Key) => {
|
||||
if (id !== user.id) {
|
||||
router.push(`/teams/${id}`);
|
||||
router.push(cloudMode ? `${process.env.cloudUrl}/teams/${id}` : `/teams/${id}`);
|
||||
} else {
|
||||
router.push('/');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue