Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from "react";
- import { Route, Switch } from "react-router-dom";
- import Register from "../auth/Register";
- import Login from "../auth/Login";
- import Dashboard from "../dashboard/Dashboard";
- import NotFound from "../layouts/NotFound";
- import PrivateRoute from "../routing/PrivateRoute";
- const Routes = () => {
- return (
- <section className="container">
- <Alert />
- <Switch>
- <Route exact path="/register" component={Register} />
- <Route exact path="/login" component={Login} />
- <Route exact path="/profiles" component={Profiles} />
- <Route exact path="/profile/:id" component={Profile} />
- <PrivateRoute exact path="/dashboard" component={Dashboard} />
- <Route component={NotFound} />
- </Switch>
- </section>
- );
- };
- export default Routes;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement