This commit is contained in:
20
node_modules/decap-cms-core/dist/esm/routing/history.js
generated
vendored
Normal file
20
node_modules/decap-cms-core/dist/esm/routing/history.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"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}`);
|
||||
}
|
||||
Reference in New Issue
Block a user