@shopgate/engage
Version:
Shopgate's ENGAGE library.
4 lines • 550 B
JavaScript
import{main$}from'@shopgate/pwa-common/streams/main';import{clearOrders}from"../action-creators";import{SUBMIT_CHECKOUT_ORDER_SUCCESS}from"../../checkout/constants/actionTypes";/**
* Orders subscriptions.
* @param {Function} subscribe The subscribe function.
*/var orders=function orders(subscribe){var checkoutSuccess$=main$.filter(function(_ref){var action=_ref.action;return action.type===SUBMIT_CHECKOUT_ORDER_SUCCESS;});subscribe(checkoutSuccess$,function(_ref2){var dispatch=_ref2.dispatch;dispatch(clearOrders());});};export default orders;