13 lines
448 B
JavaScript
Raw Normal View History

2019-10-23 13:58:54 +01:00
import { createHashHistory } from 'history';
2016-07-15 15:05:04 -03:00
const history = createHashHistory();
2016-07-15 15:05:04 -03:00
2020-06-18 10:11:37 +03:00
export const navigateToCollection = collectionName =>
history.push(`/collections/${collectionName}`);
export const navigateToNewEntry = collectionName =>
history.replace(`/collections/${collectionName}/new`);
export const navigateToEntry = (collectionName, slug) =>
history.replace(`/collections/${collectionName}/entries/${slug}`);
2016-07-15 15:05:04 -03:00
export default history;