Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from "react";
- import {
- BrowserRouter as Router, Switch, Route } from 'react-router-dom';
- import { Provider } from 'react-redux';
- import PrivateRoute from './components/PrivateRoute/PrivateRoute';
- import store from './redux/store';
- import LogIn from './components/LogIn/LogIn';
- import Dashboard from './components/Dashboard/Dashboard';
- export default function App() {
- return (
- <div className="App">
- <Router>
- <Provider store={store}>
- <Switch>
- <Route exact path="/login" component={ LogIn } />
- <PrivateRoute exact path="/" component={ Dashboard } />
- </Switch>
- </Provider>
- </Router>
- </div>
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement