postTypes.js 534 B

12345678910111213141516
  1. export const actionOnePostType = (onePost) => ({ type: 'POST', onePost })
  2. export const actionClearOnePostType = () => ({ type: 'CLEAR_ONE_POST' })
  3. export const actionPostsType = (newPosts, newPostsCount) => ({
  4. type: 'ADD-USER-POSTS',
  5. newPosts,
  6. newPostsCount,
  7. })
  8. export const actionUserAllPostsType = (allPosts) => ({
  9. type: 'USER-POSTS',
  10. allPosts,
  11. })
  12. export const actionClearAllPostsType = () => ({ type: 'CLEAR_ALL_POSTS' })
  13. export const actionCountPostsType = (countPosts) => ({
  14. type: 'COUNT_ALL_POSTS',
  15. countPosts,
  16. })