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.

add customers tab for now

Steven Teyb8ee56d88eec
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx
index 89d91efacd..6ece131153 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx
@@ -44,7 +44,7 @@ export function CustomerPageClient() {
return (
<div className="mb-10 mt-2">
- <BackLink href={`/${slug}/events`}>Events</BackLink>
+ <BackLink href={`/${slug}/customers`}>Customers</BackLink>
<div className="mt-5 flex items-center gap-4">
{customer ? (
<img
diff --git a/apps/web/lib/middleware/utils/app-redirect.ts b/apps/web/lib/middleware/utils/app-redirect.ts
index 3b444b34a7..5981b758f4 100644
--- a/apps/web/lib/middleware/utils/app-redirect.ts
+++ b/apps/web/lib/middleware/utils/app-redirect.ts
@@ -21,6 +21,11 @@ export const appRedirect = (path: string) => {
if (upgradeRegex.test(path))
return path.replace(upgradeRegex, "/$1/settings/billing/upgrade");
+ // Redirect "/[slug]/customers" to "/[slug]/events?event=lead" for now
+ const customersRegex = /^\/([^\/]+)\/customers$/;
+ if (customersRegex.test(path))
+ return path.replace(customersRegex, "/$1/events?event=lead");
+
// Redirect "programs/[programId]/settings" to "programs/[programId]/settings/rewards" (first tab)
const programSettingsRegex = /\/programs\/([^\/]+)\/settings$/;
if (programSettingsRegex.test(path))
diff --git a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
index f8619911f6..758a4a806b 100644
--- a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
@@ -14,6 +14,7 @@ import {
Key,
Receipt2,
ShieldCheck,
+ Users2,
Users6,
Webhook,
} from "@dub/ui/icons";
@@ -61,6 +62,12 @@ const NAV_AREAS: SidebarNavAreas<{
icon: CursorRays,
href: `/${slug}/events${pathname === `/${slug}/events` ? "" : queryString}`,
},
+ {
+ name: "Customers",
+ icon: Users2,
+ href: `/${slug}/customers`,
+ comingSoon: true,
+ },
{
name: "Settings",
icon: Gear,