rootSaga.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. getSubCommentFeedWatcher,
  20. addSubCommentFeedWatcher
  21. } from './saga/comment'
  22. import { onePostWatcher, postsWatcher } from './saga/post'
  23. import { changeLikePostWatcher, changeLikePostFeedWatcher } from './saga/like'
  24. import { changeSubscribeWatcher } from './saga/subscribe'
  25. import { editPostWatcher } from './saga/post'
  26. function* rootSaga() {
  27. yield all([
  28. promiseWatcher(),
  29. fullProfilePageWatcher(),
  30. loginWatcher(),
  31. registerWatcher(),
  32. fullPageAboutUserWatcher(),
  33. feedWatcher(),
  34. exploreWatcher(),
  35. onePostWatcher(),
  36. addCommentOnePostWatcher(),
  37. changeLikePostWatcher(),
  38. editPostWatcher(),
  39. changeSubscribeWatcher(),
  40. userUpdateWatcher(),
  41. setAvatarWatcher(),
  42. clearAllDataWatcher(),
  43. postsWatcher(),
  44. addCommentFeedWatcher(),
  45. addSubCommentWatcher(),
  46. getSubCommentWatcher(),
  47. changeLikePostFeedWatcher(),
  48. getSubCommentFeedWatcher(),
  49. addSubCommentFeedWatcher()
  50. ])
  51. }
  52. export default rootSaga