Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6513 Rev 6514
Línea 1... Línea 1...
1
import React, { useEffect, lazy } from 'react'
1
import React, { useEffect, lazy } from 'react'
2
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
2
import { BrowserRouter as Router, Switch } from 'react-router-dom'
3
import { useDispatch, useSelector } from 'react-redux'
3
import { useDispatch, useSelector } from 'react-redux'
4
import { getLanguage } from '../../redux/intl/intl.action'
4
import { getLanguage } from '../../redux/intl/intl.action'
Línea 5... Línea 5...
5
 
5
 
6
import Auth from '../pages/auth/Auth'
6
import Auth from '../pages/auth/Auth'
7
import PrivateRoute from './PrivateRoute'
7
import PrivateRoute from './PrivateRoute'
-
 
8
import NotificationAlert from '../components/UI/notification/NotificationAlert'
Línea 8... Línea 9...
8
import NotificationAlert from '../components/UI/notification/NotificationAlert'
9
import PublicRoute from './PublicRoute'
9
 
10
 
10
const HomeSection = lazy(() =>
11
const HomeSection = lazy(() =>
Línea 20... Línea 21...
20
  }, [])
21
  }, [])
Línea 21... Línea 22...
21
 
22
 
22
  return (
23
  return (
23
    <Router>
24
    <Router>
24
      <Switch>
25
      <Switch>
25
        <Route path="/">
26
        <PublicRoute path="/" isAuthenticated={isAuth}>
26
          <Auth />
27
          <Auth />
Línea 27... Línea 28...
27
        </Route>
28
        </PublicRoute>
28
 
29
 
29
        <PrivateRoute exact path="/dashboard" isAuthenticated={isAuth}>
30
        <PrivateRoute exact path="/dashboard" isAuthenticated={isAuth}>
30
          <HomeSection />
31
          <HomeSection />