Cleared portal checkout link on use

refs https://github.com/TryGhost/Ghost/issues/12365

- Browser back button from Stripe checkout takes users to infinite navigation loop as we were not clearing the direct checkout link
- Clears direct checkout link on load so user can continue navigation as normal
This commit is contained in:
Rish 2020-11-19 16:31:34 +05:30
parent 2a091ac56d
commit de3e5f52d0

View File

@ -9,7 +9,7 @@ import * as Fixtures from './utils/fixtures';
import ActionHandler from './actions';
import './App.css';
import NotificationParser from './utils/notifications';
import {capitalize, createPopupNotification, hasPlan, isComplimentaryMember} from './utils/helpers';
import {capitalize, createPopupNotification, hasPlan, isComplimentaryMember, removePortalLinkFromUrl} from './utils/helpers';
const React = require('react');
const DEV_MODE_DATA = {
@ -112,6 +112,7 @@ export default class App extends React.Component {
};
if (!member && ['monthly', 'yearly'].includes(pageQuery) && hasPlan({site, plan: pageQuery})) {
removePortalLinkFromUrl();
this.onAction('signup', {plan: capitalize(pageQuery)});
}