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.

conditionally show customers tab

Steven Teyed417cdd4bad
diff --git a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
index 758a4a806b..f0f42f5f58 100644
--- a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
@@ -62,12 +62,15 @@ const NAV_AREAS: SidebarNavAreas<{
icon: CursorRays,
href: `/${slug}/events${pathname === `/${slug}/events` ? "" : queryString}`,
},
- {
- name: "Customers",
- icon: Users2,
- href: `/${slug}/customers`,
- comingSoon: true,
- },
+ ...(pathname.startsWith(`/${slug}/customers`)
+ ? [
+ {
+ name: "Customers",
+ icon: Users2,
+ href: `/${slug}/customers`,
+ },
+ ]
+ : []),
{
name: "Settings",
icon: Gear,