Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6719 Rev 6724
Línea 13... Línea 13...
13
const Auth = lazy(() => import('../pages/auth/Auth'))
13
const Auth = lazy(() => import('../pages/auth/Auth'))
14
const DashboardPage = lazy(() => import('../pages/dashboard/DashboardPage'))
14
const DashboardPage = lazy(() => import('../pages/dashboard/DashboardPage'))
15
const MyConnectionsPage = lazy(() =>
15
const MyConnectionsPage = lazy(() =>
16
  import('../pages/connections/MyConnectionsPage')
16
  import('../pages/connections/MyConnectionsPage')
17
)
17
)
-
 
18
const InvitationsReceivedPage = lazy(() =>
-
 
19
  import('../pages/connections/InvitationsReceivedPage')
-
 
20
)
18
const InvitationsSendPage = lazy(() =>
21
const InvitationsSendPage = lazy(() =>
19
  import('../pages/connections/InvitationsSend')
22
  import('../pages/connections/InvitationsSendPage')
20
)
23
)
Línea 21... Línea 24...
21
 
24
 
22
const StyledSpinnerContainer = styled.div`
25
const StyledSpinnerContainer = styled.div`
23
  margin: 1rem auto;
26
  margin: 1rem auto;
Línea 40... Línea 43...
40
    dispatch(getLanguage())
43
    dispatch(getLanguage())
41
  }, [])
44
  }, [])
Línea 42... Línea 45...
42
 
45
 
43
  return (
46
  return (
-
 
47
    <Router>
-
 
48
      <Suspense fallback={null}>{isAuth && <Header />}</Suspense>
44
    <Router>
49
 
45
      <Suspense
50
      <Suspense
46
        fallback={
51
        fallback={
47
          <StyledSpinnerContainer>
52
          <StyledSpinnerContainer>
48
            <Spinner />
53
            <Spinner />
49
          </StyledSpinnerContainer>
54
          </StyledSpinnerContainer>
50
        }
55
        }
51
      >
-
 
52
        {isAuth && <Header />}
-
 
53
 
56
      >
54
        <Switch>
57
        <Switch>
55
          <PrivateRoute exact path="/dashboard" isAuthenticated={isAuth}>
58
          <PrivateRoute exact path="/dashboard" isAuthenticated={isAuth}>
56
            <DashboardPage />
59
            <DashboardPage />
57
          </PrivateRoute>
60
          </PrivateRoute>
Línea 67... Línea 70...
67
            path="/connection/invitations-sent"
70
            path="/connection/invitations-sent"
68
            isAuthenticated={isAuth}
71
            isAuthenticated={isAuth}
69
          >
72
          >
70
            <InvitationsSendPage />
73
            <InvitationsSendPage />
71
          </PrivateRoute>
74
          </PrivateRoute>
-
 
75
          <PrivateRoute
-
 
76
            exact
-
 
77
            path="/connection/invitations-received"
-
 
78
            isAuthenticated={isAuth}
-
 
79
          >
-
 
80
            <InvitationsReceivedPage />
-
 
81
          </PrivateRoute>
Línea 72... Línea 82...
72
 
82
 
73
          <PublicRoute path="/" isAuthenticated={isAuth}>
83
          <PublicRoute path="/" isAuthenticated={isAuth}>
74
            <Auth />
84
            <Auth />
75
          </PublicRoute>
85
          </PublicRoute>