all repos — caroster @ 9faf89f14884aec508f8d6684cd70ea8333d5c3d

[Octree] Group carpool to your event https://caroster.io

app/src/Router.js (view raw)

 1import React from 'react';
 2import {BrowserRouter, Route, Switch} from 'react-router-dom';
 3import useGTM from './hooks/useGTM';
 4
 5// Pages
 6import Home from './pages/Home';
 7import Event from './pages/Event';
 8import NotFound from './pages/NotFound';
 9import Dashboard from './pages/Dashboard';
10import Profile from './pages/Profile';
11import SignUp from './pages/SignUp';
12import SignIn from './pages/SignIn';
13import LostPassword from './pages/LostPassword.js';
14import ResetPassword from './pages/ResetPassword.js';
15import ErrorBoundary from './containers/ErrorBoundary';
16const Router = () => {
17  useGTM();
18  return (
19    <BrowserRouter>
20      <ErrorBoundary>
21        <Switch>
22          <Route path="/e/:eventId" component={Event} />
23          <Route path="/" exact component={Home} />
24          <Route path="/new" exact component={Home} />
25          <Route path="/register" exact component={SignUp} />
26          <Route path="/lost-password" exact component={LostPassword} />
27          <Route path="/reset-password" exact component={ResetPassword} />
28          <Route path="/login" exact component={SignIn} />
29          <Route path="/dashboard" exact component={Dashboard} />
30          <Route path="/profile" exact component={Profile} />
31          <Route path="/error" exact component={NotFound} />
32          <Route component={NotFound} />
33        </Switch>
34      </ErrorBoundary>
35    </BrowserRouter>
36  );
37};
38
39export default Router;