From 2081cbea90bf26e79133478be49b2ef8204c29c8 Mon Sep 17 00:00:00 2001 From: Kacper Wojciechowski <39823706+jog1t@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:50:49 +0200 Subject: [PATCH] fix: create new window to open a new link --- apps/hub/src/domains/game/queries/billing/mutations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/hub/src/domains/game/queries/billing/mutations.ts b/apps/hub/src/domains/game/queries/billing/mutations.ts index 36a54afe..e5fa8b03 100644 --- a/apps/hub/src/domains/game/queries/billing/mutations.ts +++ b/apps/hub/src/domains/game/queries/billing/mutations.ts @@ -37,7 +37,8 @@ export const useCreateBillingPortalSessionMutation = () => { intent, }), onSuccess: async (data) => { - window.open(data.stripeSessionUrl, "_blank"); + const win = window.open(); + win?.location.assign(data.stripeSessionUrl); }, }); };