Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4017 Rev 4019
Línea 1... Línea 1...
1
/* eslint-disable react/prop-types */
1
/* eslint-disable react/prop-types */
2
import React, { 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";
Línea 5... Línea 5...
5
 
5
 
6
import Spinner from "../../../shared/loading-spinner/Spinner";
6
import Spinner from "../../../shared/loading-spinner/Spinner";
Línea 7... Línea 7...
7
import Feed from "../feed/FeedTemplate";
7
import Feed from "../feed/FeedTemplate";
8
 
8
 
9
const ShareModal = React.lazy(() => import("../share-modal/ShareModal"))
9
const ShareModal = React.lazy(() => import("../share-modal/ShareModal"))
10
const HomeNews = React.lazy(() => import("../home-section/HomeNews"))
10
const HomeNews = React.lazy(() => import("../home-section/HomeNews"))
Línea 11... Línea 11...
11
const PeopleYouMayKnow = React.lazy(() => import("../../../shared/helpers/people-you-may-know/PeopleYouMayKnow"))
11
const PeopleYouMayKnow = React.lazy(() => { if (window.innerWidth < 1000) return import("../../../shared/helpers/people-you-may-know/PeopleYouMayKnow") })
Línea 12... Línea 12...
12
const PaginationComponent = React.lazy(() => import("../../../shared/pagination/PaginationComponent"))
12
const PaginationComponent = React.lazy(() => import("../../../shared/pagination/PaginationComponent"))
Línea 49... Línea 49...
49
      {allFeeds.length
49
      {allFeeds.length
50
        ? allFeeds.map((feed, index) =>
50
        ? allFeeds.map((feed, index) =>
51
          <>
51
          <>
52
            {
52
            {
53
              (index === 5 && PATH.includes('dashboard')) &&
53
              (index === 5 && PATH.includes('dashboard')) &&
-
 
54
              <Suspense fallback={<Spinner />}>
54
              <div className='d-block d-md-none'>
55
                <div className='d-block d-md-none'>
55
                <PeopleYouMayKnow />
56
                  <PeopleYouMayKnow />
56
              </div>
57
                </div>
-
 
58
              </Suspense>
57
            }
59
            }
58
            {
60
            {
59
              (index === 8 && PATH.includes('dashboard')) &&
61
              (index === 8 && PATH.includes('dashboard')) &&
60
              < div className='d-block d-md-none'>
62
              < div className='d-block d-md-none'>
61
                <HomeNews />
63
                <HomeNews />
Línea 77... Línea 79...
77
      <ShareModal
79
      <ShareModal
78
        timelineUrl={timelineUrl}
80
        timelineUrl={timelineUrl}
79
        currentPage={currentPage}
81
        currentPage={currentPage}
80
      />
82
      />
81
      <PaginationComponent
83
      <PaginationComponent
82
        onChangePage={onChangePageHandler}
-
 
83
        pages={pages}
-
 
84
        isRow
84
        isRow
85
        currentActivePage={currentPage}
85
        currentActivePage={currentPage}
-
 
86
        onChangePage={onChangePageHandler}
-
 
87
        pages={pages}
86
      />
88
      />
87
    </>
89
    </>
88
  );
90
  );
89
};
91
};