diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index ee979cb1d..add8dd232 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -71,7 +71,7 @@ class Create extends React.Component { return ( { - this.props.history.push(`/edit/${data.events_CreateEvent.id}`); + this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`); } } > diff --git a/client/src/Components/HostedEvents/Event.js b/client/src/Components/HostedEvents/Event.js index 4ba395132..bab987a59 100644 --- a/client/src/Components/HostedEvents/Event.js +++ b/client/src/Components/HostedEvents/Event.js @@ -50,7 +50,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/edit/${id}`} + to={`/events/edit/${id}`} > Edit @@ -60,7 +60,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/show/${id}`} + to={`/events/show/${id}`} > Show diff --git a/client/src/Components/Search/Event.js b/client/src/Components/Search/Event.js index 43c72f0ec..1736098ee 100644 --- a/client/src/Components/Search/Event.js +++ b/client/src/Components/Search/Event.js @@ -50,7 +50,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/show/${id}`} + to={`/events/show/${id}`} > Show diff --git a/client/src/Components/TopBar/data.js b/client/src/Components/TopBar/data.js index 5077584e1..89c775f60 100644 --- a/client/src/Components/TopBar/data.js +++ b/client/src/Components/TopBar/data.js @@ -7,16 +7,16 @@ import { const data = [ { - title: 'Look for an event', to: '/', icon: Search, text: '', + title: 'Look for an event', to: '/events/', icon: Search, text: '', }, { - title: 'Events you are enrolled in', to: '/my', icon: GamepadRounded, text: '', + title: 'Events you are enrolled in', to: '/events/my', icon: GamepadRounded, text: '', }, { - title: 'Your hosted competition', to: '/host', icon: AccessibilityNew, text: '', + title: 'Your hosted competition', to: '/events/host', icon: AccessibilityNew, text: '', }, { - title: 'Host a new competition', to: '/create', icon: LibraryAdd, text: '', + title: 'Host a new competition', to: '/events/create', icon: LibraryAdd, text: '', }, ]; diff --git a/client/src/index.js b/client/src/index.js index 63d02671a..778b76313 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Route, BrowserRouter, Switch } from 'react-router-dom'; +import { Route, Switch } from 'react-router-dom'; import { MuiPickersUtilsProvider } from 'material-ui-pickers'; import LuxonUtils from 'material-ui-pickers/utils/luxon-utils'; @@ -39,19 +39,15 @@ class App extends Component { } return ( - -
- {loggedIn} - - - - - - - - -
-
+ {loggedIn} + + + + + + + +
); }