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 .link stuff to upgraded modal

Tim Wilson2d7cb28b6b14
diff --git a/apps/web/lib/dynadot/search-domains.ts b/apps/web/lib/dynadot/search-domains.ts
index b6600bf173..9df80fdc8a 100644
--- a/apps/web/lib/dynadot/search-domains.ts
+++ b/apps/web/lib/dynadot/search-domains.ts
@@ -65,7 +65,10 @@ export const searchDomainsAvailability = async ({
});
}
- const data = schema.parse(await response.json());
+ const result = await response.json();
+ console.log({ DYNADOT_BASE_URL, searchParams, result });
+
+ const data = schema.parse(result);
if (data.SearchResponse.ResponseCode === "-1") {
throw new DubApiError({
diff --git a/apps/web/ui/modals/upgraded-modal.tsx b/apps/web/ui/modals/upgraded-modal.tsx
index 179159ecb8..271bb719e6 100644
--- a/apps/web/ui/modals/upgraded-modal.tsx
+++ b/apps/web/ui/modals/upgraded-modal.tsx
@@ -13,6 +13,7 @@ import {
useRef,
useState,
} from "react";
+import { RegisterDomainForm } from "../domains/register-domain-form";
import { ModalHero } from "../shared/modal-hero";
function UpgradedModal({
@@ -96,6 +97,16 @@ function UpgradedModal({
</>
)}
</p>
+ {!dotLinkClaimed && (
+ <div className="mt-6 rounded-xl border border-neutral-100 bg-neutral-50 p-4">
+ <RegisterDomainForm
+ onSuccess={() => {
+ setShowUpgradedModal(false);
+ }}
+ onCancel={() => setShowUpgradedModal(false)}
+ />
+ </div>
+ )}
</div>
{/* Bottom scroll fade */}
<div
@@ -105,11 +116,15 @@ function UpgradedModal({
</div>
<Button
type="button"
- variant="primary"
- text="Go to Dub"
+ variant={dotLinkClaimed ? "primary" : "secondary"}
+ text={
+ dotLinkClaimed
+ ? "Go to Dub"
+ : "No thanks, take me to the dashboard"
+ }
onClick={() =>
queryParams({
- del: ["onboarded", "upgraded", "plan", "period"],
+ del: ["upgraded", "plan", "period"],
})
}
/>
diff --git a/apps/web/ui/modals/welcome-modal.tsx b/apps/web/ui/modals/welcome-modal.tsx
index 75d4d10b27..8bc71b4ef8 100644
--- a/apps/web/ui/modals/welcome-modal.tsx
+++ b/apps/web/ui/modals/welcome-modal.tsx
@@ -116,7 +116,7 @@ function WelcomeModal({
className="mt-2"
onClick={() =>
queryParams({
- del: ["onboarded", "upgraded", "plan", "period"],
+ del: ["onboarded"],
})
}
/>