Files
klz-cables.com/.pnpm-store/v10/files/62/e680e50d42e64ff57a3e0092780ec49ede90cf48b7e217c9e735b9af6371a3b26ad8c4fcec9ae25c1d295d467183537cd75ea8ab6944d3cc46ac191cfc122d
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

27 lines
648 B
Plaintext

import { PREFERENCE_KEYS } from 'payload/shared';
import { cache } from 'react';
export const getNavPrefs = cache(async req => {
return req?.user?.collection ? await req.payload.find({
collection: 'payload-preferences',
depth: 0,
limit: 1,
pagination: false,
req,
where: {
and: [{
key: {
equals: PREFERENCE_KEYS.NAV
}
}, {
'user.relationTo': {
equals: req.user.collection
}
}, {
'user.value': {
equals: req?.user?.id
}
}]
}
})?.then(res => res?.docs?.[0]?.value) : null;
});
//# sourceMappingURL=getNavPrefs.js.map