rootSaga.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { clearAllDataWatcher } from './saga/logOut'
  2. import { feedWatcher } from './saga/feed'
  3. import { all } from 'redux-saga/effects'
  4. import { promiseWatcher } from './saga/promise'
  5. import { loginWatcher } from './saga/login'
  6. import { registerWatcher } from './saga/register'
  7. import {
  8. fullProfilePageWatcher,
  9. userUpdateWatcher,
  10. setAvatarWatcher,
  11. } from './saga/myProfile'
  12. import { fullPageAboutUserWatcher } from './saga/userProfile'
  13. import { exploreWatcher } from './saga/explore'
  14. import {
  15. addCommentFeedWatcher,
  16. addCommentOnePostWatcher,
  17. addSubCommentWatcher,
  18. getSubCommentWatcher,
  19. } from './saga/comment'
  20. import { onePostWatcher, postsWatcher } from './saga/post'
  21. import { changeLikePostWatcher, changeLikePostFeedWatcher } from './saga/like'
  22. import { changeSubscribeWatcher } from './saga/subscribe'
  23. import { editPostWatcher } from './saga/post'
  24. function* rootSaga() {
  25. yield all([
  26. promiseWatcher(),
  27. fullProfilePageWatcher(),
  28. loginWatcher(),
  29. registerWatcher(),
  30. fullPageAboutUserWatcher(),
  31. feedWatcher(),
  32. exploreWatcher(),
  33. onePostWatcher(),
  34. addCommentOnePostWatcher(),
  35. changeLikePostWatcher(),
  36. editPostWatcher(),
  37. changeSubscribeWatcher(),
  38. userUpdateWatcher(),
  39. setAvatarWatcher(),
  40. clearAllDataWatcher(),
  41. postsWatcher(),
  42. addCommentFeedWatcher(),
  43. addSubCommentWatcher(),
  44. getSubCommentWatcher(),
  45. changeLikePostFeedWatcher(),
  46. ])
  47. }
  48. export default rootSaga