From 8c703eff93de9ffd214f6dbc9521680857988309 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Tue, 23 Sep 2025 15:00:07 -0700 Subject: [PATCH] resolve bug. reset queryparams when selecting segment/cohort from screens. add cohort prefix to event and path --- src/app/(main)/websites/[websiteId]/cohorts/CohortsTable.tsx | 2 +- .../(main)/websites/[websiteId]/segments/SegmentsTable.tsx | 4 +++- src/lib/request.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/(main)/websites/[websiteId]/cohorts/CohortsTable.tsx b/src/app/(main)/websites/[websiteId]/cohorts/CohortsTable.tsx index 200449fc..f57382ca 100644 --- a/src/app/(main)/websites/[websiteId]/cohorts/CohortsTable.tsx +++ b/src/app/(main)/websites/[websiteId]/cohorts/CohortsTable.tsx @@ -19,7 +19,7 @@ export function CohortsTable({ data = [] }) { {(row: any) => ( - {row.name} + {row.name} )} diff --git a/src/app/(main)/websites/[websiteId]/segments/SegmentsTable.tsx b/src/app/(main)/websites/[websiteId]/segments/SegmentsTable.tsx index 98224637..804c7b5b 100644 --- a/src/app/(main)/websites/[websiteId]/segments/SegmentsTable.tsx +++ b/src/app/(main)/websites/[websiteId]/segments/SegmentsTable.tsx @@ -18,7 +18,9 @@ export function SegmentsTable({ data = [] }) { {(row: any) => ( - {row.name} + + {row.name} + )} diff --git a/src/lib/request.ts b/src/lib/request.ts index fb01a049..4840f36c 100644 --- a/src/lib/request.ts +++ b/src/lib/request.ts @@ -119,7 +119,7 @@ export async function getQueryFilters( })); cohortFilters.push({ - name: cohortParams.action.type, + name: `cohort_${cohortParams.action.type}`, operator: 'eq', value: cohortParams.action.value, });