From 58f202503826f51ae1b131fa69362c353dc6e909 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Fri, 18 Feb 2022 00:27:11 +0530 Subject: [PATCH] Fixed offer links signup type for logged in members - logged in members need a special checkoutType metadata in api payload to avoid sending login link email --- ghost/portal/src/App.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghost/portal/src/App.js b/ghost/portal/src/App.js index a9b11e0b75..9d4122c1f3 100644 --- a/ghost/portal/src/App.js +++ b/ghost/portal/src/App.js @@ -98,7 +98,7 @@ export default class App extends React.Component { } /** Setup custom trigger buttons handling on page */ - setupCustomTriggerButton(props) { + setupCustomTriggerButton() { if (hasMode(['test'])) { return; } @@ -595,7 +595,11 @@ export default class App extends React.Component { this.dispatchAction('openPopup', { page: 'loading' }); - this.dispatchAction('signup', {plan: price.id, offerId}); + if (member) { + this.dispatchAction('checkoutPlan', {plan: price.id, offerId}); + } else { + this.dispatchAction('signup', {plan: price.id, offerId}); + } } else { this.dispatchAction('openPopup', { page: 'offer',