Migrate goAway to hide

parent 39b9d1c9
...@@ -145,7 +145,7 @@ export default class FileTemplateMediator { ...@@ -145,7 +145,7 @@ export default class FileTemplateMediator {
text: __('Undo'), text: __('Undo'),
onClick: (e, toastObj) => { onClick: (e, toastObj) => {
self.restoreFromCache(); self.restoreFromCache();
toastObj.goAway(0); toastObj.hide();
}, },
}, },
}); });
......
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
text: this.alertContent.actionText, text: this.alertContent.actionText,
onClick: (_, toastObject) => { onClick: (_, toastObject) => {
this[this.alertContent.actionName](); this[this.alertContent.actionName]();
toastObject.goAway(0); toastObject.hide();
}, },
}, },
}; };
......
...@@ -44,12 +44,12 @@ export default { ...@@ -44,12 +44,12 @@ export default {
const { targetBranch } = this; const { targetBranch } = this;
return this.fetchRules({ targetBranch, resetToDefault: true }).then(() => { return this.fetchRules({ targetBranch, resetToDefault: true }).then(() => {
const toast = showToast(__('Approval rules reset to project defaults'), { showToast(__('Approval rules reset to project defaults'), {
action: { action: {
text: __('Undo'), text: __('Undo'),
onClick: () => { onClick: (_, toast) => {
this.undoRulesChange(); this.undoRulesChange();
toast.goAway(0); toast.hide();
}, },
}, },
}); });
......
...@@ -243,7 +243,7 @@ export const dismissVulnerability = ( ...@@ -243,7 +243,7 @@ export const dismissVulnerability = (
dispatch('revertDismissVulnerability', { vulnerability }) dispatch('revertDismissVulnerability', { vulnerability })
.then(() => dispatch('fetchVulnerabilities', { page })) .then(() => dispatch('fetchVulnerabilities', { page }))
.catch(() => {}); .catch(() => {});
toastObject.goAway(0); toastObject.hide();
} }
}, },
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment