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.

remove openInNewTab for now

Steven Teya052cfc49576
diff --git a/apps/web/ui/partners/rewards/rewards-upgrade-modal.tsx b/apps/web/ui/partners/rewards/rewards-upgrade-modal.tsx
index 6088eca6b3..aca5e7fbf2 100644
--- a/apps/web/ui/partners/rewards/rewards-upgrade-modal.tsx
+++ b/apps/web/ui/partners/rewards/rewards-upgrade-modal.tsx
@@ -163,7 +163,6 @@ export function RewardsUpgradeModal({
period={isAnnual ? "yearly" : "monthly"}
text={`Continue with ${plan.name}`}
variant="primary"
- openInNewTab
/>
<Button
text="Maybe later"
diff --git a/apps/web/ui/workspaces/upgrade-plan-button.tsx b/apps/web/ui/workspaces/upgrade-plan-button.tsx
index 491d8fcdde..85b5d01bd7 100644
--- a/apps/web/ui/workspaces/upgrade-plan-button.tsx
+++ b/apps/web/ui/workspaces/upgrade-plan-button.tsx
@@ -12,12 +12,10 @@ import { useState } from "react";
export function UpgradePlanButton({
plan,
period,
- openInNewTab = false,
...rest
}: {
plan: string;
period: "monthly" | "yearly";
- openInNewTab?: boolean;
} & Partial<ButtonProps>) {
const router = useRouter();
const pathname = usePathname();
@@ -75,9 +73,7 @@ export function UpgradePlanButton({
stripe?.redirectToCheckout({ sessionId });
} else {
const { url } = await res.json();
- if (openInNewTab)
- window.open(url, "_blank"); // May cause "pop-up blocked" due to the navigation being delayed from the click
- else router.push(url);
+ router.push(url);
}
})
.catch((err) => {