Created
December 14, 2019 13:31
-
-
Save docentedev/2bb19aeda776d57f10fd32cb6783bc25 to your computer and use it in GitHub Desktop.
Rutas 404 Redux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; | |
import { Provider } from 'react-redux'; | |
import { PrivateRoute } from './components/private-route/PrivateRoute'; | |
import store from './store'; | |
import './App.css'; | |
import Home from './containers/home/Home'; | |
import Login from './containers/login/Login'; | |
import PrivateHome from './containers/private-home/PrivateHome'; | |
import NotFound from './containers/not-found/NotFound'; | |
function App() { | |
return ( | |
<div className="app"> | |
<Provider store={store}> | |
<Router> | |
<Switch> | |
<Route exact path="/" component={Home} /> | |
<Route path="/login" component={Login}/> | |
<PrivateRoute path="/private/home" component={PrivateHome} /> | |
<Route component={NotFound} /> | |
</Switch> | |
</Router> | |
</Provider> | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment