@zohodesk/dot
Version:
In this Library, we Provide Some Basic Components to Build Your Application
37 lines (31 loc) • 803 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.popNotificationAction = void 0;
var popNotificationAction = function () {
var ob = {
resolve: function resolve() {},
reject: function reject() {}
};
function showNotification(data) {
return function (dispatch) {
dispatch(showPopNotification(data));
return new Promise(function (res, rej) {
ob.resolve = function (notifiId) {
dispatch(hidePopNotification(notifiId));
res();
};
ob.reject = function (notifiId) {
dispatch(hidePopNotification(notifiId));
rej();
};
});
};
}
return {
ob: ob,
showNotification: showNotification
};
}();
exports.popNotificationAction = popNotificationAction;