Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4063 Rev 4222
Línea 1... Línea 1...
1
/* eslint-disable react/prop-types */
1
/* eslint-disable react/prop-types */
2
import React, { Suspense, useEffect } from "react";
2
import React, { Suspense, useEffect } from "react";
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 Spinner from "../../../shared/loading-spinner/Spinner";
5
import Feed from "../feed/FeedTemplate";
6
import Feed from "../feed/FeedTemplate";
6
const ShareModal = React.lazy(() => import("../share-modal/ShareModal"))
7
const ShareModal = React.lazy(() => import("../share-modal/ShareModal"))
7
const PaginationComponent = React.lazy(() => import("../../../shared/pagination/PaginationComponent"))
8
const PaginationComponent = React.lazy(() => import("../../../shared/pagination/PaginationComponent"))
Línea 8... Línea 9...
8
 
9
 
9
const isDashboard = window.location.pathname.includes('dashboard')
10
const isDashboard = window.location.pathname.includes('dashboard')
Línea 10... Línea 11...
10
const isMobile = window.innerWidth < 1000
11
const isMobile = window.innerWidth < 1000
Línea 11... Línea 12...
11
 
12
 
12
const FeedSection = ({ feed, image }) => {
13
const FeedSection = ({ feed, image }) => {
Línea 13... Línea 14...
13
 
14
 
Línea 30... Línea 31...
30
    dispatch(setCurrentPage(currentPage));
31
    dispatch(setCurrentPage(currentPage));
31
    dispatch(fetchFeeds(timelineUrl, currentPage))
32
    dispatch(fetchFeeds(timelineUrl, currentPage))
32
    window.scrollTo(0, 0);
33
    window.scrollTo(0, 0);
33
  };
34
  };
Línea -... Línea 35...
-
 
35
 
-
 
36
  if (loading) {
-
 
37
    return <Spinner />
-
 
38
  }
34
 
39
 
35
  return (
40
  return (
36
    <>
41
    <>
37
      {allFeeds.length
42
      {allFeeds.length
38
        ? allFeeds.map((feed, index) => {
43
        ? allFeeds.map((feed, index) => {