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:
Peter Zimon 2020-10-14 16:18:09 +02:00
parent 5ec1bdb05e
commit 510dfd75d9
2 changed files with 12 additions and 7 deletions

View File

@ -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 {};

View File

@ -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',