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 branch 'main' into partner-link-titles

Pedro Ladeiraf34ae936a325
diff --cc apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/customers/(index)/page.tsx
index 7eab235362,bab2f49044..27897eb6bc
--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/customers/(index)/page.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/customers/(index)/page.tsx
@@@ -1,9 -1,11 +1,12 @@@
"use client";
- import { PARTNER_CUSTOMERS_MAX_PAGE_SIZE } from "@/lib/constants/partner-profile";
+ import {
+ CUSTOMER_LTV_EXCLUDED_PROGRAM_IDS,
+ PARTNER_CUSTOMERS_MAX_PAGE_SIZE,
+ } from "@/lib/constants/partner-profile";
import usePartnerCustomers from "@/lib/swr/use-partner-customers";
import usePartnerCustomersCount from "@/lib/swr/use-partner-customers-count";
+import { usePartnerLinksDisplay } from "@/lib/swr/use-partner-links-display";
import useProgramEnrollment from "@/lib/swr/use-program-enrollment";
import { CustomerRowItem } from "@/ui/customers/customer-row-item";
import { AnimatedEmptyState } from "@/ui/shared/animated-empty-state";
diff --cc apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/links/partner-link-card.tsx
index 529bc95954,640a9a6e48..7ac2abac69
--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/links/partner-link-card.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/links/partner-link-card.tsx
@@@ -1,7 -1,7 +1,8 @@@
import { formatDateTooltip } from "@/lib/analytics/format-date-tooltip";
import { constructPartnerLink } from "@/lib/partners/construct-partner-link";
+ import { QueryLinkStructureHelpText } from "@/lib/partners/query-link-structure-help-text";
import usePartnerAnalytics from "@/lib/swr/use-partner-analytics";
+import { PartnerLinksDisplayContext } from "@/lib/swr/use-partner-links-display";
import useProgramEnrollment from "@/lib/swr/use-program-enrollment";
import { PartnerProfileLinkProps } from "@/lib/types";
import { CommentsBadge } from "@/ui/links/comments-badge";
@@@ -155,24 -138,11 +156,29 @@@ export function PartnerLinkCard({ link
{/* The max width implementation here is a bit hacky, we should improve in the future */}
<div className="flex max-w-[100px] items-center gap-1 py-0 pl-1 pr-1.5 sm:w-fit sm:max-w-[400px]">
<ArrowTurnRight2 className="h-3 w-3 shrink-0 text-neutral-400" />
- {programEnrollment?.group?.linkStructure === "query" ? (
+ {showTitle ? (
+ <a
+ href={isDeactivated ? undefined : partnerLink}
+ target="_blank"
+ rel="noopener noreferrer"
+ className={cn(
+ "truncate text-sm transition-colors",
+ isDeactivated
+ ? "cursor-default text-neutral-400"
+ : "text-neutral-500 hover:text-neutral-700 hover:underline hover:underline-offset-2",
+ )}
+ title={getPrettyUrl(partnerLink)}
+ onClick={
+ isDeactivated ? (e) => e.preventDefault() : undefined
+ }
+ >
+ {getPrettyUrl(partnerLink)}
+ </a>
++ ) : programEnrollment?.group?.linkStructure === "query" ? (
+ <QueryLinkStructureHelpText
+ link={link}
+ className="mt-0.5"
+ />
) : (
<a
href={isDeactivated ? undefined : link.url}