Files
klz-cables.com/.pnpm-store/v10/files/61/9c8ce369af0fc62ad0e57c17da525826557caaaccf41227b4337e727563971bee5e146b26b0a90efeba8b174fc3078f466aabacb62d39a21f66462bed1241f
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

48 lines
1.2 KiB
Plaintext

'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import React from 'react';
import { useTranslation } from '../../../providers/Translation/index.js';
import { Button } from '../../Button/index.js';
const baseClass = 'list-create-new-doc';
export function ListCreateNewButton(t0) {
const $ = _c(5);
const {
collectionConfig,
hasCreatePermission,
newDocumentURL
} = t0;
const {
i18n,
t
} = useTranslation();
if (!hasCreatePermission) {
return null;
}
const t1 = collectionConfig?.labels?.singular;
let t2;
if ($[0] !== i18n || $[1] !== newDocumentURL || $[2] !== t || $[3] !== t1) {
t2 = _jsx(Button, {
"aria-label": t("general:createNewLabel", {
label: getTranslation(t1, i18n)
}),
buttonStyle: "pill",
className: `${baseClass}__create-new-button`,
el: "link",
size: "small",
to: newDocumentURL,
children: t("general:createNew")
}, "create-new-button");
$[0] = i18n;
$[1] = newDocumentURL;
$[2] = t;
$[3] = t1;
$[4] = t2;
} else {
t2 = $[4];
}
return t2;
}
//# sourceMappingURL=ListCreateNewDocButton.js.map