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
34 lines
920 B
Plaintext
34 lines
920 B
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';
|
|
export const ArrayCell = t0 => {
|
|
const $ = _c(2);
|
|
const {
|
|
cellData,
|
|
field: t1
|
|
} = t0;
|
|
const {
|
|
labels
|
|
} = t1;
|
|
const {
|
|
i18n
|
|
} = useTranslation();
|
|
const arrayFields = cellData ?? [];
|
|
const label = arrayFields.length === 1 ? `${arrayFields.length} ${getTranslation(labels?.singular || i18n.t("general:rows"), i18n)}` : `${arrayFields.length} ${getTranslation(labels?.plural || i18n.t("general:rows"), i18n)}`;
|
|
let t2;
|
|
if ($[0] !== label) {
|
|
t2 = _jsx("span", {
|
|
children: label
|
|
});
|
|
$[0] = label;
|
|
$[1] = t2;
|
|
} else {
|
|
t2 = $[1];
|
|
}
|
|
return t2;
|
|
};
|
|
//# sourceMappingURL=index.js.map |