mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Don't allow saving segments on share page.
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
This commit is contained in:
parent
dbac6192db
commit
e7f565f143
1 changed files with 2 additions and 1 deletions
|
|
@ -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 }));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue