Change "new entry" path to avoid slug conflicts.
This commit is contained in:
parent
9d9efdd66a
commit
8b5dc61e6c
@ -197,7 +197,7 @@ class App extends React.Component {
|
||||
<Switch>
|
||||
<Route exact path='/' component={DashboardPage} />
|
||||
<Route exact path="/collections/:name" component={CollectionPage} />
|
||||
<Route path="/collections/:name/entries/new" render={(props) => (<EntryPage {...props} newRecord={true}/>)} />
|
||||
<Route path="/collections/:name/new" render={(props) => (<EntryPage {...props} newRecord />)} />
|
||||
<Route path="/collections/:name/entries/:slug" component={EntryPage} />
|
||||
<Route path="/search/:searchTerm" component={SearchPage} />
|
||||
<Route component={NotFoundPage} />
|
||||
|
@ -10,7 +10,7 @@ export function getCollectionUrl(collectionName, direct) {
|
||||
}
|
||||
|
||||
export function getNewEntryUrl(collectionName, direct) {
|
||||
return getUrl(`/collections/${ collectionName }/entries/new`, direct);
|
||||
return getUrl(`/collections/${ collectionName }/new`, direct);
|
||||
}
|
||||
|
||||
/* See https://www.w3.org/International/articles/idn-and-iri/#path.
|
||||
|
Loading…
x
Reference in New Issue
Block a user