nahuelbkn

App.js

Jan 13th, 2021
669
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from "react";
  2. import {
  3.   BrowserRouter as Router, Switch,  Route } from 'react-router-dom';
  4. import { Provider } from 'react-redux';
  5. import PrivateRoute from './components/PrivateRoute/PrivateRoute';
  6. import store from './redux/store';
  7. import LogIn from './components/LogIn/LogIn';
  8. import Dashboard from './components/Dashboard/Dashboard';
  9.  
  10.  
  11.  
  12. export default function App() {
  13.   return (
  14.     <div className="App">
  15.       <Router>
  16.         <Provider store={store}>
  17.           <Switch>
  18.             <Route exact path="/login" component={ LogIn } />
  19.             <PrivateRoute exact path="/" component={ Dashboard } />
  20.           </Switch>
  21.         </Provider>
  22.       </Router>
  23.     </div>
  24.   );
  25. }
RAW Paste Data