12 lines
333 B
JavaScript
12 lines
333 B
JavaScript
|
function getUrl(url, direct) {
|
||
|
return `${ direct ? '/#' : '' }${ url }`;
|
||
|
}
|
||
|
|
||
|
export function getCollectionUrl(collectionName, direct) {
|
||
|
return getUrl(`/collections/${ collectionName }`, direct);
|
||
|
}
|
||
|
|
||
|
export function getNewEntryUrl(collectionName, direct) {
|
||
|
return getUrl(`/collections/${ collectionName }/entries/new`, direct);
|
||
|
}
|