Files
klz-cables.com/.pnpm-store/v10/files/5c/59f38230c7eaf97dac2d6d1e2f0aafd3ac7a465ff402112649761fca75c369528101d5324dda0e7fcde9e8149fd40dcdccb9e4e58f3696937a7d877f0cfd43
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

66 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
import { Fragment } from 'react';
import { DocumentTabLink } from './TabLink.js';
export const baseClass = 'doc-tab';
export const DefaultDocumentTab = props => {
const {
apiURL,
collectionConfig,
globalConfig,
permissions,
req,
tabConfig: {
href: tabHref,
isActive: tabIsActive,
label,
newTab,
Pill,
Pill_Component
}
} = props;
let href = typeof tabHref === 'string' ? tabHref : '';
let isActive = typeof tabIsActive === 'boolean' ? tabIsActive : false;
if (typeof tabHref === 'function') {
href = tabHref({
apiURL,
collection: collectionConfig,
global: globalConfig,
routes: req.payload.config.routes
});
}
if (typeof tabIsActive === 'function') {
isActive = tabIsActive({
href
});
}
const labelToRender = typeof label === 'function' ? label({
t: req.i18n.t
}) : label;
return /*#__PURE__*/_jsx(DocumentTabLink, {
adminRoute: req.payload.config.routes.admin,
ariaLabel: labelToRender,
baseClass: baseClass,
href: href,
isActive: isActive,
newTab: newTab,
children: /*#__PURE__*/_jsxs("span", {
className: `${baseClass}__label`,
children: [labelToRender, Pill || Pill_Component ? /*#__PURE__*/_jsxs(Fragment, {
children: [" ", RenderServerComponent({
Component: Pill,
Fallback: Pill_Component,
importMap: req.payload.importMap,
serverProps: {
i18n: req.i18n,
payload: req.payload,
permissions,
req,
user: req.user
}
})]
}) : null]
})
});
};
//# sourceMappingURL=index.js.map