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 payment-methods.tsx

Steven Tey1b7db259a60c
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/payment-methods.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/payment-methods.tsx
index c3dece3099..f9f33ddff8 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/payment-methods.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/payment-methods.tsx
@@ -118,6 +118,7 @@ const PaymentMethodCard = ({
type: Stripe.PaymentMethod.Type;
paymentMethod?: Stripe.PaymentMethod;
}) => {
+ const router = useRouter();
const { slug } = useWorkspace();
const [isLoading, setIsLoading] = useState(false);
@@ -140,8 +141,7 @@ const PaymentMethodCard = ({
},
).then((res) => res.json());
- window.open(url, "_blank");
- setIsLoading(false);
+ router.push(url);
};
return (