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.

Don't allow saving segments on share page.

Mike Caoe7f565f143d6
diff --git a/src/components/input/FilterBar.tsx b/src/components/input/FilterBar.tsx
index 96ad51b4f..b81f77e30 100644
--- a/src/components/input/FilterBar.tsx
+++ b/src/components/input/FilterBar.tsx
@@ -25,13 +25,14 @@ export function FilterBar({ websiteId }: { websiteId: string }) {
const { formatValue } = useFormat();
const {
router,
+ pathname,
updateParams,
replaceParams,
query: { segment, cohort },
} = useNavigation();
const { filters, operatorLabels } = useFilters();
const { data, isLoading } = useWebsiteSegmentQuery(websiteId, segment || cohort);
- const canSaveSegment = filters.length > 0 && !segment && !cohort;
+ const canSaveSegment = filters.length > 0 && !segment && !cohort && !pathname.includes('/share');
const handleCloseFilter = (param: string) => {
router.push(updateParams({ [param]: undefined }));