Files
klz-cables.com/.pnpm-store/v10/files/a1/4697d0800d2749c5af1ec7cb81b7944dabde0bdc1596c28e99eecd5f046e7d19429515f1e22011fe0c90779e2f7610c15eab0afae20023b0c664d52d12a01b
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

31 lines
801 B
Plaintext

import { getRouteWithoutAdmin } from './getRouteWithoutAdmin.js';
/**
* Returns an array of views marked with 'public: true' in the config
*/
export const isCustomAdminView = ({
adminRoute,
config,
route
}) => {
if (config.admin?.components?.views) {
const isPublicAdminRoute = Object.entries(config.admin.components.views).some(([_, view]) => {
const routeWithoutAdmin = getRouteWithoutAdmin({
adminRoute,
route
});
if (view.exact) {
if (routeWithoutAdmin === view.path) {
return true;
}
} else {
if (routeWithoutAdmin.startsWith(view.path)) {
return true;
}
}
return false;
});
return isPublicAdminRoute;
}
return false;
};
//# sourceMappingURL=isCustomAdminView.js.map