UNPKG

@zohodesk/dot

Version:

In this Library, we Provide Some Basic Components to Build Your Application

28 lines (25 loc) 554 B
export const popNotificationAction = (() => { let ob = { resolve: () => {}, reject: () => {} }; function showNotification(data) { return dispatch => { dispatch(showPopNotification(data)); return new Promise((res, rej) => { ob.resolve = notifiId => { dispatch(hidePopNotification(notifiId)); res(); }; ob.reject = notifiId => { dispatch(hidePopNotification(notifiId)); rej(); }; }); }; } return { ob, showNotification }; })();