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 create program card

Kiran K004b67ab5cda
diff --git a/apps/web/ui/layout/sidebar/create-program-card.tsx b/apps/web/ui/layout/sidebar/create-program-card.tsx
new file mode 100644
index 0000000000..9b9a7999a2
--- /dev/null
+++ b/apps/web/ui/layout/sidebar/create-program-card.tsx
@@ -0,0 +1,22 @@
+import { Button, NavWordmark } from "@dub/ui";
+
+export function CreateProgramCard() {
+ return (
+ <div className="relative mt-6 flex flex-col gap-3 overflow-hidden rounded-lg border border-black/[0.1] bg-white p-3 pt-4 shadow-[0px_1px_1px_0px_#0000000A] [box-shadow:inset_0px_0px_8px_0px_#FFFFFF]">
+ <div className="absolute inset-0 opacity-[0.08] [background:conic-gradient(from_0deg_at_50%_50%,#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]" />
+
+ <div className="relative flex items-center gap-2">
+ <NavWordmark variant="symbol" className="h-4 w-4" />
+ </div>
+
+ <div className="relative flex flex-col gap-1">
+ <h1 className="text-sm font-semibold text-neutral-900">Dub Partners</h1>
+ <p className="text-sm text-neutral-800">
+ Grow your revenue on autopilot with Dub Partners
+ </p>
+ </div>
+
+ <Button text="Create program" className="relative" />
+ </div>
+ );
+}
diff --git a/apps/web/ui/layout/sidebar/sidebar-nav.tsx b/apps/web/ui/layout/sidebar/sidebar-nav.tsx
index de7311648f..ac38297e31 100644
--- a/apps/web/ui/layout/sidebar/sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/sidebar-nav.tsx
@@ -1,10 +1,4 @@
-import {
- AnimatedSizeContainer,
- Button,
- ClientOnly,
- Icon,
- NavWordmark,
-} from "@dub/ui";
+import { AnimatedSizeContainer, ClientOnly, Icon, NavWordmark } from "@dub/ui";
import { cn } from "@dub/utils";
import { AnimatePresence, motion } from "framer-motion";
import { ChevronDown, ChevronLeft } from "lucide-react";
@@ -17,6 +11,7 @@ import {
useMemo,
useState,
} from "react";
+import { CreateProgramCard } from "./create-program-card";
import UserDropdown from "./user-dropdown";
export type NavItemCommon = {
@@ -130,20 +125,7 @@ export function SidebarNav<T extends Record<any, any>>({
))}
</div>
- <div className="flex flex-col gap-3 rounded-lg border-neutral-300 bg-red-100 p-3 pt-4">
- {/* ad icon */}
-
- <div className="flex flex-col gap-1">
- <h1 className="text-sm font-semibold text-neutral-900">
- Dub Partners
- </h1>
- <p className="text-sm text-neutral-800">
- Grow your revenue on autopilot with Dub Partners
- </p>
- </div>
-
- <Button text="Create program" />
- </div>
+ <CreateProgramCard />
<AnimatePresence>
{showNews && (