Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6983 Rev 6993
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 { BrowserRouter as Router, Switch } from 'react-router-dom'
3
import { Route, 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 PublicRoute from './PublicRoute'
7
import PublicRoute from './PublicRoute'
Línea 60... Línea 60...
60
const CompanyViewPage = lazy(() => import('../pages/company/CompanyViewPage'))
60
const CompanyViewPage = lazy(() => import('../pages/company/CompanyViewPage'))
61
const GroupViewPage = lazy(() => import('../pages/groups/GroupViewPage'))
61
const GroupViewPage = lazy(() => import('../pages/groups/GroupViewPage'))
62
const GroupEditPage = lazy(() => import('../pages/groups/GroupEditPage'))
62
const GroupEditPage = lazy(() => import('../pages/groups/GroupEditPage'))
63
const ChatPage = lazy(() => import('../pages/chat/ChatPage'))
63
const ChatPage = lazy(() => import('../pages/chat/ChatPage'))
64
const InmailPage = lazy(() => import('../pages/inmail/InmailPage'))
64
const InmailPage = lazy(() => import('../pages/inmail/InmailPage'))
-
 
65
const MarketPlacePage = lazy(() =>
-
 
66
  import('../pages/marketplace/MarketplacePage')
-
 
67
)
Línea 65... Línea 68...
65
 
68
 
66
const AppRouter = () => {
69
const AppRouter = () => {
67
  const { isAuth, theme_id } = useSelector(({ auth }) => auth)
70
  const { isAuth, theme_id } = useSelector(({ auth }) => auth)
Línea 88... Línea 91...
88
        <Switch>
91
        <Switch>
89
          <PrivateRoute exact path="/dashboard" isAuthenticated={isAuth}>
92
          <PrivateRoute exact path="/dashboard" isAuthenticated={isAuth}>
90
            <DashboardPage />
93
            <DashboardPage />
91
          </PrivateRoute>
94
          </PrivateRoute>
Línea 92... Línea 95...
92
 
95
 
93
          <PrivateRoute
-
 
94
            exact
96
          <PrivateRoute isAuthenticated={isAuth}>
95
            path="/connection/my-connections"
-
 
96
            isAuthenticated={isAuth}
-
 
97
          >
97
            <Route exact path="/connection/my-connections">
98
            <MyConnectionsPage />
-
 
99
          </PrivateRoute>
-
 
100
          <PrivateRoute
98
              <MyConnectionsPage />
101
            exact
99
            </Route>
102
            path="/connection/invitations-sent"
100
            <Route exact path="/connection/invitations-sent">
103
            isAuthenticated={isAuth}
101
              <InvitationsSendPage />
104
          >
-
 
105
            <InvitationsSendPage />
102
            </Route>
-
 
103
          </PrivateRoute>
106
          </PrivateRoute>
104
 
107
          <PrivateRoute
105
          <PrivateRoute
108
            exact
106
            exact
109
            path="/connection/invitations-received"
107
            path="/connection/invitations-received"
110
            isAuthenticated={isAuth}
108
            isAuthenticated={isAuth}
Línea 245... Línea 243...
245
          </PrivateRoute>
243
          </PrivateRoute>
246
          <PrivateRoute path="/inmail" isAuthenticated={isAuth}>
244
          <PrivateRoute path="/inmail" isAuthenticated={isAuth}>
247
            <InmailPage />
245
            <InmailPage />
248
          </PrivateRoute>
246
          </PrivateRoute>
Línea -... Línea 247...
-
 
247
 
-
 
248
          <PrivateRoute path="/marketplace" isAuthenticated={isAuth}>
-
 
249
            <MarketPlacePage />
-
 
250
          </PrivateRoute>
249
 
251
 
250
          <PublicRoute path="/" isAuthenticated={isAuth}>
252
          <PublicRoute path="/" isAuthenticated={isAuth}>
251
            <Auth />
253
            <Auth />
252
          </PublicRoute>
254
          </PublicRoute>
253
        </Switch>
255
        </Switch>