mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
Removed notifications when cancelling Stripe flows
no refs. - removed notifications when clicking on the back button Stripe checkout either in update plan or in sign up flows
This commit is contained in:
parent
5ec1bdb05e
commit
510dfd75d9
@ -209,13 +209,18 @@ export default class App extends React.Component {
|
||||
fetchNotificationData() {
|
||||
const {type, status, duration, autoHide, closeable} = NotificationParser({billingOnly: true}) || {};
|
||||
if (['stripe:billing-update'].includes(type)) {
|
||||
const popupNotification = createPopupNotification({
|
||||
type, status, duration, closeable, autoHide, state: this.state,
|
||||
message: status === 'success' ? 'Billing info updated successfully' : 'Billing update was cancelled'
|
||||
});
|
||||
if (status === 'success') {
|
||||
const popupNotification = createPopupNotification({
|
||||
type, status, duration, closeable, autoHide, state: this.state,
|
||||
message: status === 'success' ? 'Billing info updated successfully' : ''
|
||||
});
|
||||
return {
|
||||
showPopup: true,
|
||||
popupNotification
|
||||
};
|
||||
}
|
||||
return {
|
||||
showPopup: true,
|
||||
popupNotification
|
||||
showPopup: true
|
||||
};
|
||||
}
|
||||
return {};
|
||||
|
@ -12,7 +12,7 @@ export const handleAuthActions = ({qsParams, action, status}) => {
|
||||
};
|
||||
|
||||
export const handleStripeActions = ({status, billingOnly}) => {
|
||||
if (!billingOnly && ['cancel', 'success'].includes(status)) {
|
||||
if (!billingOnly && ['success'].includes(status)) {
|
||||
const statusVal = status === 'success' ? 'success' : 'warning';
|
||||
return {
|
||||
type: 'stripe:checkout',
|
||||
|
Loading…
Reference in New Issue
Block a user