Last active
September 23, 2019 03:08
-
-
Save alexytiger/b8475ed2928ad4b72052d876269d56e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| reload$ = createEffect( | |
| () => | |
| this.actions$.pipe( | |
| ofType( | |
| PurchaseContractActions.abortSelectedPurchaseContractSuccess, | |
| PurchaseContractActions.confirmBuySuccess, | |
| PurchaseContractActions.confirmDeliverySuccess), | |
| withLatestFrom(this.store$.pipe(select(fromStore.getSelectedPurchaseContract))), | |
| tap(async ([action, contract]) => { | |
| // here we trigger the the router's state change event | |
| const randomKey = Math.random().toString(36).replace('0.', ''); | |
| await this.router.navigate(['/p2p-bazaar/products', randomKey]); | |
| await this.router.navigate(['/p2p-bazaar/products', contract.productKey]); | |
| }) | |
| ), | |
| { dispatch: false } | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment