Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4945 | Rev 5901 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 4945 Rev 5107
Línea 3... Línea 3...
3
import { useDispatch, useSelector } from 'react-redux'
3
import { useDispatch, useSelector } from 'react-redux'
4
import { fetchFeeds, setCurrentPage } from '../../../../redux/feed/feed.actions'
4
import { fetchFeeds, setCurrentPage } from '../../../../redux/feed/feed.actions'
5
import EmptySection from '../../../../shared/empty-section/EmptySection'
5
import EmptySection from '../../../../shared/empty-section/EmptySection'
6
import Spinner from '../../../../shared/loading-spinner/Spinner'
6
import Spinner from '../../../../shared/loading-spinner/Spinner'
7
import ShareModal from '../../../components/share-modal/ShareModal'
7
import ShareModal from '../../../components/share-modal/ShareModal'
8
const PaginationComponent = React.lazy(() => import('../../../../shared/pagination/PaginationComponent'))
-
 
9
import Feed from './Feed'
8
import Feed from './Feed'
-
 
9
const PaginationComponent = React.lazy(() => import('../../../../shared/pagination/PaginationComponent'))
Línea 10... Línea 10...
10
 
10
 
11
const FeedList = ({
11
const FeedList = ({
12
  feed = {},
12
  feed = {},
13
  image = ''
13
  image = ''
Línea 21... Línea 21...
21
    if (feed) {
21
    if (feed) {
22
      return fetchSpecificFeed()
22
      return fetchSpecificFeed()
23
    } else {
23
    } else {
24
      return dispatch(fetchFeeds(timelineUrl, currentPage))
24
      return dispatch(fetchFeeds(timelineUrl, currentPage))
25
    }
25
    }
26
  }, []);
26
  }, [])
Línea 27... Línea 27...
27
 
27
 
28
  const onChangePageHandler = (currentPage) => {
28
  const onChangePageHandler = (currentPage) => {
29
    dispatch(setCurrentPage(currentPage));
29
    dispatch(setCurrentPage(currentPage))
30
    dispatch(fetchFeeds(timelineUrl, currentPage))
30
    dispatch(fetchFeeds(timelineUrl, currentPage))
31
    window.scrollTo(0, 0);
31
    window.scrollTo(0, 0)
Línea 32... Línea 32...
32
  };
32
  }
33
 
33
 
34
  if (loading) {
34
  if (loading) {