decap-cms-core
Version:
Decap CMS core application, see decap-cms package for the main distribution.
18 lines (12 loc) • 506 B
text/typescript
import { createHashHistory } from 'history';
const history = createHashHistory();
export function navigateToCollection(collectionName: string) {
return history.push(`/collections/${collectionName}`);
}
export function navigateToNewEntry(collectionName: string) {
return history.replace(`/collections/${collectionName}/new`);
}
export function navigateToEntry(collectionName: string, slug: string) {
return history.replace(`/collections/${collectionName}/entries/${slug}`);
}
export { history };