Guest User

Untitled

a guest
Jan 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. /**
  2. * Get Campaigns
  3. */
  4. export const getCampaigns = contactStrategyActionFactory.async<number, Campaign[], Error>('GET_CAMPAIGNS');
  5. export const campaignsLens = Lens.fromProp<ContactStrategyStore, 'campaigns'>('campaigns');
  6.  
  7. const getCampaignsReducer = reducerFactory(getCampaigns, campaignsLens);
  8. const getCampaignsEpic: Epic = a$ =>
  9. a$.pipe(
  10. filterSwitchAsync(getCampaigns, companyId => from(GetCampaigns({ companyId }).then(({ campaigns }) => campaigns)))
  11. );
Add Comment
Please, Sign In to add comment