renaming routes

This commit is contained in:
Nikola Bjelo committed 2018-11-01 08:34:30 +01:00
1 parent 7e7dbc1401
commit 46f2bf04cb
5 files changed
+10 -10

No files matched your search

+2 -2
View File
@@ -48,7 +48,7 @@ class Event extends React.Component {
color='primary'
size='small'
component={Link}
to={`/event/${designator}/edit`}
to={`/edit/${designator}`}
>
Edit
</Button>
@@ -58,7 +58,7 @@ class Event extends React.Component {
color='primary'
size='small'
component={Link}
to={'/event/' + designator}
to={'/show/' + designator}
>
Show
</Button>
+1 -1
View File
@@ -26,7 +26,7 @@ class HostedEvent extends React.Component {
}
handleNewEvent = (event) => {
this.props.history.push(`/event/${event.designator}/edit`)
this.props.history.push(`/edit/${event.designator}`)
};
render () {
+1 -1
View File
@@ -48,7 +48,7 @@ class Event extends React.Component {
color='primary'
size='small'
component={Link}
to={'/event/' + designator}
to={'/show/' + designator}
>
Show
</Button>
+2 -2
View File
@@ -4,8 +4,8 @@ import LibraryAddIcon from '@material-ui/icons/LibraryAdd'
const data = [
{ title: 'Look for an event', to: '/', icon: SearchIcon, text: '' },
{ title: 'Events you are enrolled in', to: '/events', icon: GamesIcon, text: '' },
{ title: 'Host your own competition', to: '/hosted-events', icon: LibraryAddIcon, text: '' }
{ title: 'Events you are enrolled in', to: '/my', icon: GamesIcon, text: '' },
{ title: 'Host your own competition', to: '/host', icon: LibraryAddIcon, text: '' }
]
export default data
+4 -4
View File
@@ -43,10 +43,10 @@ class App extends Component {
{loggedIn}
<Switch>
<Route exact path='/' component={Search} />
<Route path='/events' component={Events} />
<Route path='/event/:slug/edit' component={EditEvent} />
<Route path='/event/:slug' component={EditEvent} />
<Route path='/hosted-events' component={HostedEvents} />
<Route path='/my' component={Events} />
<Route path='/exact/:slug' component={EditEvent} />
<Route path='/show/:slug' component={EditEvent} />
<Route path='/host' component={HostedEvents} />
</Switch>
</div>
</BrowserRouter>