Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

stay in team context for website header links

Francis Cao4b40b4e9cf3a
diff --git a/src/app/(main)/teams/[teamId]/websites/[websiteId]/event-data/page.tsx b/src/app/(main)/teams/[teamId]/websites/[websiteId]/event-data/page.tsx
new file mode 100644
index 000000000..87de2abe2
--- /dev/null
+++ b/src/app/(main)/teams/[teamId]/websites/[websiteId]/event-data/page.tsx
@@ -0,0 +1,3 @@
+import Page from 'app/(main)/websites/[websiteId]/event-data/page';
+
+export default Page;
diff --git a/src/app/(main)/teams/[teamId]/websites/[websiteId]/realtime/page.tsx b/src/app/(main)/teams/[teamId]/websites/[websiteId]/realtime/page.tsx
new file mode 100644
index 000000000..ffeaa9288
--- /dev/null
+++ b/src/app/(main)/teams/[teamId]/websites/[websiteId]/realtime/page.tsx
@@ -0,0 +1,3 @@
+import Page from 'app/(main)/websites/[websiteId]/realtime/page';
+
+export default Page;
diff --git a/src/app/(main)/teams/[teamId]/websites/[websiteId]/reports/page.tsx b/src/app/(main)/teams/[teamId]/websites/[websiteId]/reports/page.tsx
new file mode 100644
index 000000000..9a97b9c50
--- /dev/null
+++ b/src/app/(main)/teams/[teamId]/websites/[websiteId]/reports/page.tsx
@@ -0,0 +1,3 @@
+import Page from 'app/(main)/websites/[websiteId]/reports/page';
+
+export default Page;
diff --git a/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx b/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx
index 3d0292506..dc0f4338e 100644
--- a/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx
+++ b/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx
@@ -1,6 +1,6 @@
import classNames from 'classnames';
import Favicon from 'components/common/Favicon';
-import { useMessages, useWebsite } from 'components/hooks';
+import { useMessages, useTeamUrl, useWebsite } from 'components/hooks';
import Icons from 'components/icons';
import ActiveUsers from 'components/metrics/ActiveUsers';
import Link from 'next/link';
@@ -19,6 +19,7 @@ export function WebsiteHeader({
children?: ReactNode;
}) {
const { formatMessage, labels } = useMessages();
+ const { renderTeamUrl } = useTeamUrl();
const pathname = usePathname();
const { data: website } = useWebsite(websiteId);
const { name, domain } = website || {};
@@ -62,7 +63,11 @@ export function WebsiteHeader({
: pathname.match(/^\/websites\/[\w-]+$/);
return (
- <Link key={label} href={`/websites/${websiteId}${path}`} shallow={true}>
+ <Link
+ key={label}
+ href={renderTeamUrl(`/websites/${websiteId}${path}`)}
+ shallow={true}
+ >
<Button
variant="quiet"
className={classNames({