nextload/src/utils/generateBreadcrumbsUrl.ts
tobias 60f7a4e4f2
Some checks failed
continuous-integration/drone/push Build is failing
Add block editing
2024-06-23 22:23:06 +02:00

8 lines
278 B
TypeScript

export default function generateBreadcrumbsUrl(docs: any, lastDoc: any) {
let prefix = ''
// You might want different prefixes for different collections.
switch (lastDoc._collection) {
}
return docs.reduce((url: any, doc: any) => `${url}/${doc.slug ?? ''}`, prefix)
}