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.

fix: destination url necessary

flooorianflo2c83d3b3ccf9
diff --git a/apps/web/ui/modals/add-edit-link-modal/index.tsx b/apps/web/ui/modals/add-edit-link-modal/index.tsx
index b426a3e4e3..3ea96eb98a 100644
--- a/apps/web/ui/modals/add-edit-link-modal/index.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal/index.tsx
@@ -528,19 +528,22 @@ function AddEditLinkModal({
href: `${HOME_DOMAIN}/pricing`,
})}
/>
+ ) : !url ? (
+ "Please enter a destination URL to generate AI Short Link."
) : (
"Create Short Link with AI"
)
}
>
<button
- className="flex items-center space-x-2 text-sm text-gray-500 transition-all duration-75 hover:text-black active:scale-95"
+ className="flex items-center space-x-2 text-sm text-gray-500 transition-all duration-75 hover:text-black active:scale-95 disabled:cursor-not-allowed"
onClick={generateAIKey}
disabled={
generatingAIKey ||
generatingRandomKey ||
!plan ||
- plan === "free"
+ plan === "free" ||
+ !url
}
type="button"
>