Files
klz-cables.com/.pnpm-store/v10/files/b0/dc5e748a92c18566f0f5fe6138c436a89bd5034f97f66505e76b50d6f2b6e1f06c0ffbe31a6e2a9831b51b061c8dd6c218c325d42c857e3c0c16987f6bd785
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

22 lines
949 B
Plaintext

import { EntityType } from './groupNavItems.js';
import { groupNavItems } from './groupNavItems.js';
/** @internal */
export function getNavGroups(permissions, visibleEntities, config, i18n) {
const collections = config.collections.filter(collection => permissions?.collections?.[collection.slug]?.read && visibleEntities.collections.includes(collection.slug));
const globals = config.globals.filter(global => permissions?.globals?.[global.slug]?.read && visibleEntities.globals.includes(global.slug));
const navGroups = groupNavItems([...(collections.map(collection => {
const entityToGroup = {
type: EntityType.collection,
entity: collection
};
return entityToGroup;
}) ?? []), ...(globals.map(global => {
const entityToGroup = {
type: EntityType.global,
entity: global
};
return entityToGroup;
}) ?? [])], permissions, i18n);
return navGroups;
}
//# sourceMappingURL=getNavGroups.js.map