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
36 lines
897 B
Plaintext
36 lines
897 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 function isComponent(description) {
|
|
return /*#__PURE__*/React.isValidElement(description);
|
|
}
|
|
export function ViewDescription(props) {
|
|
const $ = _c(3);
|
|
const {
|
|
i18n
|
|
} = useTranslation();
|
|
const {
|
|
description
|
|
} = props;
|
|
if (description) {
|
|
let t0;
|
|
if ($[0] !== description || $[1] !== i18n) {
|
|
t0 = _jsx("div", {
|
|
className: "custom-view-description",
|
|
children: getTranslation(description, i18n)
|
|
});
|
|
$[0] = description;
|
|
$[1] = i18n;
|
|
$[2] = t0;
|
|
} else {
|
|
t0 = $[2];
|
|
}
|
|
return t0;
|
|
}
|
|
return null;
|
|
}
|
|
//# sourceMappingURL=index.js.map |