renaming routes
This commit is contained in:
1 parent
7e7dbc1401
commit
46f2bf04cb
5 files changed
+10
-10
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -48,7 +48,7 @@ class Event extends React.Component {
|
||||
color='primary'
|
||||
size='small'
|
||||
component={Link}
|
||||
to={'/event/' + designator}
|
||||
to={'/show/' + designator}
|
||||
>
|
||||
Show
|
||||
</Button>
|
||||
|
||||
@@ -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
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user