Files
klz-cables.com/.pnpm-store/v10/files/4c/027dcae55ab9a083d4153f6556a02970382b3d96571e77ce5e82c66da311ba048dfcda376a5e0dd3f18392e3cae5ad20a445459de2842e6f3ab592485ee8ed
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

49 lines
1.3 KiB
Plaintext

'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { getObjectDotNotation } from 'payload/shared';
import React from 'react';
import { useConfig } from '../../../../../providers/Config/index.js';
import { useTranslation } from '../../../../../providers/Translation/index.js';
import { formatDate } from '../../../../../utilities/formatDocTitle/formatDateTitle.js';
export const DateCell = props => {
const {
cellData,
field: t0,
rowData
} = props;
const {
name,
accessor,
admin: t1,
timezone: timezoneFromField
} = t0;
const {
date
} = t1 === undefined ? {} : t1;
const {
config: t2
} = useConfig();
const {
admin: t3
} = t2;
const {
dateFormat: dateFormatFromRoot
} = t3;
const {
i18n
} = useTranslation();
const fieldPath = accessor || name;
const timezoneFieldName = `${fieldPath}_tz`;
const timezone = Boolean(timezoneFromField) && rowData ? getObjectDotNotation(rowData, timezoneFieldName, undefined) : undefined;
const dateFormat = date?.displayFormat || dateFormatFromRoot;
return _jsx("span", {
children: Boolean(cellData) && formatDate({
date: cellData,
i18n,
pattern: dateFormat,
timezone
})
});
};
//# sourceMappingURL=index.js.map