UNPKG

decap-cms-core

Version:

Decap CMS core application, see decap-cms package for the main distribution.

20 lines (19 loc) 700 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.history = void 0; exports.navigateToCollection = navigateToCollection; exports.navigateToEntry = navigateToEntry; exports.navigateToNewEntry = navigateToNewEntry; var _history = require("history"); const history = exports.history = (0, _history.createHashHistory)(); function navigateToCollection(collectionName) { return history.push(`/collections/${collectionName}`); } function navigateToNewEntry(collectionName) { return history.replace(`/collections/${collectionName}/new`); } function navigateToEntry(collectionName, slug) { return history.replace(`/collections/${collectionName}/entries/${slug}`); }