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.

Update create-program-card.tsx

Kiran K73a19c0d2455
diff --git a/apps/web/ui/layout/sidebar/create-program-card.tsx b/apps/web/ui/layout/sidebar/create-program-card.tsx
index a900a7cd85..d6ea5ad8e0 100644
--- a/apps/web/ui/layout/sidebar/create-program-card.tsx
+++ b/apps/web/ui/layout/sidebar/create-program-card.tsx
@@ -1,21 +1,26 @@
import usePrograms from "@/lib/swr/use-programs";
import useWorkspace from "@/lib/swr/use-workspace";
-import { buttonVariants, NavWordmark } from "@dub/ui";
+import { buttonVariants, ConnectedDots4 } from "@dub/ui";
import { cn } from "@dub/utils";
import Link from "next/link";
export function CreateProgramCard() {
- const { programs } = usePrograms();
- const { partnersEnabled, slug } = useWorkspace();
+ const { programs, loading: programsLoading } = usePrograms();
+ const { partnersEnabled, slug, loading: workspaceLoading } = useWorkspace();
- if (!partnersEnabled || (programs && programs.length > 0)) {
+ if (
+ !partnersEnabled ||
+ programsLoading ||
+ workspaceLoading ||
+ (programs && programs.length > 0)
+ ) {
return null;
}
return (
<div className="relative mt-6 flex flex-col gap-3 overflow-hidden rounded-lg border bg-white p-3 pt-4">
<div className="relative flex items-center gap-2">
- <NavWordmark variant="symbol" className="h-4 w-4" />
+ <ConnectedDots4 className="size-4" />
</div>
<div className="relative flex flex-col gap-1">
@@ -29,7 +34,7 @@ export function CreateProgramCard() {
href={`/${slug}/programs/new`}
className={cn(
buttonVariants({ variant: "primary" }),
- "flex h-10 items-center justify-center rounded-lg border px-3 text-sm",
+ "flex h-8 items-center justify-center rounded-md border px-3 text-sm",
)}
>
Create program