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.

More product nav updates

Tim Wilson59d4b8703db3
diff --git a/packages/ui/src/content.ts b/packages/ui/src/content.ts
index 4224813837..cd2333c432 100644
--- a/packages/ui/src/content.ts
+++ b/packages/ui/src/content.ts
@@ -2,17 +2,16 @@ import { ElementType } from "react";
import {
Book2Fill,
BulletListFill,
- ConnectedDotsFill,
- CubeSettingsFill,
DiamondTurnRightFill,
+ DubAnalyticsIcon,
+ DubLinksIcon,
+ DubPartnersIcon,
FeatherFill,
Github,
Go,
HeadsetFill,
HeartFill,
HexadecagonStar,
- Hyperlink,
- LinesY,
LinkedIn,
MicrophoneFill,
Php,
@@ -20,11 +19,13 @@ import {
Python,
Raycast,
Ruby,
+ Toggle2Fill,
Twitter,
Typescript,
UsersFill,
YouTube,
} from "./icons";
+import { DubApiIcon } from "./icons/dub-api";
import { Elxo } from "./icons/elxo";
export type NavItemChild = {
@@ -44,25 +45,31 @@ export const FEATURES_LIST = [
{
title: "Dub Links",
description: "Short links with superpowers",
- icon: Hyperlink,
+ icon: DubLinksIcon,
href: "/home",
},
+ {
+ title: "Dub Partners",
+ description: "Grow your revenue with partnerships",
+ icon: DubPartnersIcon,
+ href: "/partners",
+ },
{
title: "Dub Analytics",
description: "Powerful real-time analytics",
- icon: LinesY,
+ icon: DubAnalyticsIcon,
href: "/analytics",
},
{
title: "Dub API",
description: "Programmatic link creation at scale",
- icon: CubeSettingsFill,
+ icon: DubApiIcon,
href: "/docs/api-reference/introduction",
},
{
title: "Dub Integrations",
description: "Connect Dub with your favorite tools",
- icon: ConnectedDotsFill,
+ icon: Toggle2Fill,
href: "/integrations",
},
];
diff --git a/packages/ui/src/icons/dub-api.tsx b/packages/ui/src/icons/dub-api.tsx
new file mode 100644
index 0000000000..20c843fb98
--- /dev/null
+++ b/packages/ui/src/icons/dub-api.tsx
@@ -0,0 +1,19 @@
+import { SVGProps } from "react";
+
+export function DubApiIcon(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="12"
+ height="12"
+ fill="none"
+ viewBox="0 0 12 12"
+ {...props}
+ >
+ <path
+ fill="currentColor"
+ d="M7.311 2.624a1.126 1.126 0 0 1 1.506-.077l.086.077 1.519 1.52.18.199a2.626 2.626 0 0 1-.18 3.514L8.903 9.375l-.086.078a1.126 1.126 0 0 1-1.506-1.669l1.52-1.52.048-.058a.38.38 0 0 0 0-.412l-.048-.06-1.52-1.518-.077-.086a1.126 1.126 0 0 1 .077-1.506M3.183 2.547A1.126 1.126 0 0 1 4.766 4.13l-.078.086-1.52 1.519a.375.375 0 0 0 0 .53l1.52 1.52.078.085a1.125 1.125 0 0 1-1.583 1.583l-.086-.078-1.519-1.518a2.626 2.626 0 0 1 0-3.713l1.519-1.52z"
+ />
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/index.tsx b/packages/ui/src/icons/index.tsx
index 02ebb24421..06cd912211 100644
--- a/packages/ui/src/icons/index.tsx
+++ b/packages/ui/src/icons/index.tsx
@@ -7,6 +7,7 @@ import { ComponentType, SVGProps } from "react";
export { default as Copy } from "./copy";
export * from "./crown-small";
export * from "./dub-analytics";
+export * from "./dub-api";
export * from "./dub-crafted-shield";
export * from "./dub-links";
export * from "./dub-partners";
diff --git a/packages/ui/src/nav/nav-mobile.tsx b/packages/ui/src/nav/nav-mobile.tsx
index 90d545a854..24fc46e69d 100644
--- a/packages/ui/src/nav/nav-mobile.tsx
+++ b/packages/ui/src/nav/nav-mobile.tsx
@@ -4,13 +4,42 @@ import { APP_DOMAIN, cn, createHref, fetcher } from "@dub/utils";
import { ChevronDown, Menu, X } from "lucide-react";
import Link from "next/link";
import { useParams } from "next/navigation";
-import { ComponentProps, useEffect, useState } from "react";
+import { ComponentProps, ReactNode, useEffect, useState } from "react";
import useSWR from "swr";
import { AnimatedSizeContainer } from "../animated-size-container";
import { ButtonProps, buttonVariants } from "../button";
import { NavItemChild, NavItemChildren } from "../content";
+import {
+ DubAnalyticsIcon,
+ DubApiIcon,
+ DubLinksIcon,
+ DubPartnersIcon,
+} from "../icons";
import { navItems, type NavTheme } from "./nav";
+const specialIcons: Record<string, ReactNode> = {
+ "Dub Links": (
+ <div className="flex size-5 items-center justify-center rounded bg-orange-400">
+ <DubLinksIcon className="size-3 text-orange-900" />
+ </div>
+ ),
+ "Dub Partners": (
+ <div className="flex size-5 items-center justify-center rounded bg-violet-400">
+ <DubPartnersIcon className="size-3 text-violet-900" />
+ </div>
+ ),
+ "Dub Analytics": (
+ <div className="flex size-5 items-center justify-center rounded bg-green-400">
+ <DubAnalyticsIcon className="size-3 text-green-900" />
+ </div>
+ ),
+ "Dub API": (
+ <div className="flex size-5 items-center justify-center rounded bg-neutral-400">
+ <DubApiIcon className="size-3 text-neutral-900" />
+ </div>
+ ),
+};
+
export function NavMobile({
theme = "light",
staticDomain,
@@ -218,6 +247,8 @@ const ChildItem = ({
}) => {
const { domain = "dub.co" } = useParams() as { domain: string };
+ const SpecialIcon = specialIcons?.[title];
+
return (
<Link
href={createHref(href, domain, {
@@ -235,12 +266,14 @@ const ChildItem = ({
size === "small" && "size-8",
)}
>
- <Icon
- className={cn(
- "size-5 text-neutral-700 grayscale",
- size === "small" && "size-4",
- )}
- />
+ {SpecialIcon ?? (
+ <Icon
+ className={cn(
+ "size-5 text-neutral-700 grayscale",
+ size === "small" && "size-4",
+ )}
+ />
+ )}
</div>
<div>
<div className="flex items-center gap-2">
diff --git a/packages/ui/src/nav/nav.tsx b/packages/ui/src/nav/nav.tsx
index 4e620565c5..7742632061 100644
--- a/packages/ui/src/nav/nav.tsx
+++ b/packages/ui/src/nav/nav.tsx
@@ -27,7 +27,14 @@ export const navItems = [
name: "Product",
content: ProductContent,
childItems: FEATURES_LIST,
- segments: ["/home", "/analytics", "/features", "/compare", "/integrations"],
+ segments: [
+ "/home",
+ "/partners",
+ "/analytics",
+ "/features",
+ "/compare",
+ "/integrations",
+ ],
},
{
name: "Solutions",