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

54 lines
1.3 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 { optionsAreObjects } from 'payload/shared';
import React from 'react';
import { useTranslation } from '../../../../../providers/Translation/index.js';
export const SelectCell = t0 => {
const $ = _c(7);
const {
cellData,
field: t1
} = t0;
const {
options
} = t1;
const {
i18n
} = useTranslation();
let t2;
if ($[0] !== i18n || $[1] !== options) {
t2 = items => items.map(i => {
const found = options.filter(f => f.value === i)?.[0]?.label;
return getTranslation(found, i18n);
}).join(", ");
$[0] = i18n;
$[1] = options;
$[2] = t2;
} else {
t2 = $[2];
}
const findLabel = t2;
let t3;
if ($[3] !== cellData || $[4] !== findLabel || $[5] !== options) {
let content;
if (optionsAreObjects(options)) {
content = Array.isArray(cellData) ? findLabel(cellData) : findLabel([cellData]);
} else {
content = Array.isArray(cellData) ? cellData.join(", ") : cellData;
}
t3 = _jsx("span", {
children: content
});
$[3] = cellData;
$[4] = findLabel;
$[5] = options;
$[6] = t3;
} else {
t3 = $[6];
}
return t3;
};
//# sourceMappingURL=index.js.map