Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Merge pull request #1 from pepeladeira/feat/advanced-filters

Pedro Ladeira35627a2a1460
diff --cc apps/web/ui/analytics/use-analytics-filters.tsx
index d7853448c7,e810e04611..328e6c7e49
--- a/apps/web/ui/analytics/use-analytics-filters.tsx
+++ b/apps/web/ui/analytics/use-analytics-filters.tsx
@@@ -47,9 -48,13 +48,12 @@@ import
linkConstructor,
nFormatter,
OG_AVATAR_URL,
+ parseFilterValue,
REGIONS,
+ type FilterOperator,
+ type ParsedFilter,
} from "@dub/utils";
import { useParams } from "next/navigation";
-import posthog from "posthog-js";
import {
ComponentProps,
ContextType,
@@@ -838,22 -876,17 +875,13 @@@ export function useAnalyticsFilters(
});
}
}
- posthog.capture("ai_filters_generated", {
- prompt,
- filters: activeFilters,
- });
setStreaming(false);
- } else {
+ } else if (key === "link") {
queryParams({
- set:
- key === "link"
- ? {
- domain: new URL(`https://${value}`).hostname,
- key: new URL(`https://${value}`).pathname.slice(1) || "_root",
- }
- : key === "tagIds"
- ? {
- tagIds: selectedTagIds.concat(value).join(","),
- }
- : {
- [key]: value,
- },
+ set: {
+ domain: new URL(`https://${value}`).hostname,
+ key: new URL(`https://${value}`).pathname.slice(1) || "_root",
+ },
del: "page",
scroll: false,
});