Files
klz-cables.com/.pnpm-store/v10/files/25/590ac2c96b7ef64345a57fc3dd491d9a11466bfe620edfbab98f9f0b5261b33204af15fb6a5cf625d27af29d82df8eb54bca833a92bc8f27c85baec94e7d8f
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

29 lines
1.1 KiB
Plaintext

import { getTranslation } from '@payloadcms/translations';
import { generateMetadata } from '../../utilities/meta.js';
/**
* @todo Remove the `MetaConfig` type assertions. They are currently required because of how the `Metadata` type from `next` consumes the `URL` type.
*/
export const generateAPIViewMetadata = async ({
collectionConfig,
config,
globalConfig,
i18n
}) => {
const entityLabel = collectionConfig ? getTranslation(collectionConfig.labels.singular, i18n) : globalConfig ? getTranslation(globalConfig.label, i18n) : '';
return Promise.resolve(generateMetadata({
...(config.admin.meta || {}),
description: `API - ${entityLabel}`,
keywords: 'API',
serverURL: config.serverURL,
title: `API - ${entityLabel}`,
...(collectionConfig ? {
...(collectionConfig?.admin.meta || {}),
...(collectionConfig?.admin?.components?.views?.edit?.api?.meta || {})
} : {}),
...(globalConfig ? {
...(globalConfig?.admin.meta || {}),
...(globalConfig?.admin?.components?.views?.edit?.api?.meta || {})
} : {})
}));
};
//# sourceMappingURL=metadata.js.map