Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 7378 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7378 Rev 7382
Línea 1... Línea 1...
1
import React, { lazy, Suspense, useEffect } from 'react'
1
import React, { lazy, Suspense, useEffect } from 'react'
2
import { useDispatch, useSelector } from 'react-redux'
2
import { useDispatch, useSelector } from 'react-redux'
3
import { Route, BrowserRouter as Router, Switch } from 'react-router-dom'
3
import { BrowserRouter as Router, Switch } from 'react-router-dom'
4
import { getLanguage } from '../../redux/intl/intl.action'
4
import { getLanguage } from '../../redux/intl/intl.action'
5
import { getPermissions } from '../redux/auth/auth.actions'
5
import { getPermissions } from '../redux/auth/auth.actions'
Línea 6... Línea 6...
6
 
6
 
7
import AuthRoute from './AuthRoute'
7
import AuthRoute from './AuthRoute'
8
import PrivateRoute from './PrivateRoute'
8
import PrivateRoute from './PrivateRoute'
9
import Spinner from '../components/UI/Spinner'
9
import Spinner from '../components/UI/Spinner'
10
import NotificationAlert from '../components/UI/notification/NotificationAlert'
10
import NotificationAlert from '../components/UI/notification/NotificationAlert'
Línea -... Línea 11...
-
 
11
import LoaderContainer from '../components/UI/LoaderContainer'
11
import LoaderContainer from '../components/UI/LoaderContainer'
12
 
-
 
13
import ChatHelper from '../components/chat/helper/ChatHelper'
12
 
14
import Header from '../components/navbar/Header'
13
const Header = lazy(() => import('../components/navbar/Header'))
15
 
14
const DashboardPage = lazy(() => import('../pages/dashboard/DashboardPage'))
16
const DashboardPage = lazy(() => import('../pages/dashboard/DashboardPage'))
15
const MyConnectionsPage = lazy(() =>
17
const MyConnectionsPage = lazy(() =>
16
  import('../pages/connections/MyConnectionsPage')
18
  import('../pages/connections/MyConnectionsPage')
Línea 77... Línea 79...
77
const PostViewPage = lazy(() => import('../pages/posts/PostViewPage'))
79
const PostViewPage = lazy(() => import('../pages/posts/PostViewPage'))
78
const MyCoachPage = lazy(() => import('../pages/my-coach/MyCoachPage'))
80
const MyCoachPage = lazy(() => import('../pages/my-coach/MyCoachPage'))
79
const MyCoachViewPage = lazy(() => import('../pages/my-coach/MyCoachViewPage'))
81
const MyCoachViewPage = lazy(() => import('../pages/my-coach/MyCoachViewPage'))
80
const JobViewPage = lazy(() => import('../pages/jobs/JobView'))
82
const JobViewPage = lazy(() => import('../pages/jobs/JobView'))
81
const CalendarPage = lazy(() => import('../pages/calendar/CalendarPage'))
83
const CalendarPage = lazy(() => import('../pages/calendar/CalendarPage'))
82
const ChatHelper = lazy(() => import('../components/chat/helper/ChatHelper'))
-
 
83
const SigninPage = lazy(() => import('../pages/auth/SigninPage'))
84
const SigninPage = lazy(() => import('../pages/auth/SigninPage'))
84
const ImpersonatePage = lazy(() =>
85
const ImpersonatePage = lazy(() =>
85
  import('../pages/impersonate/InpersonatePage')
86
  import('../pages/impersonate/InpersonatePage')
86
)
87
)
Línea 102... Línea 103...
102
    )
103
    )
103
  }
104
  }
Línea 104... Línea 105...
104
 
105
 
105
  return (
106
  return (
106
    <Router>
-
 
107
      <Suspense fallback={null}>
107
    <Router>
108
        {isAuth ? <Header theme={theme_id} /> : null}
-
 
Línea 109... Línea 108...
109
      </Suspense>
108
      {isAuth ? <Header theme={theme_id} /> : null}
110
 
109
 
111
      <Suspense
110
      <Suspense
112
        fallback={
111
        fallback={
Línea 329... Línea 328...
329
            <ResetPasswordPage />
328
            <ResetPasswordPage />
330
          </AuthRoute>
329
          </AuthRoute>
331
          <AuthRoute exact path="/forgot-password" isAuthenticated={isAuth}>
330
          <AuthRoute exact path="/forgot-password" isAuthenticated={isAuth}>
332
            <ForgotPasswordPage />
331
            <ForgotPasswordPage />
333
          </AuthRoute> */}
332
          </AuthRoute> */}
334
 
-
 
335
          <Route path="*">
-
 
336
            <h1>404 Not found</h1>
-
 
337
          </Route>
-
 
338
        </Switch>
333
        </Switch>
339
      </Suspense>
334
      </Suspense>
Línea 340... Línea 335...
340
 
335
 
341
      <NotificationAlert />
-
 
342
 
336
      <NotificationAlert />
343
      <Suspense fallback={null}>{isAuth ? <ChatHelper /> : null}</Suspense>
337
      {isAuth ? <ChatHelper /> : null}
344
    </Router>
338
    </Router>
345
  )
339
  )
Línea 346... Línea 340...
346
}
340
}