Skip to content

Commit

Permalink
THEMES-1654: passed in dateLocalization from site properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
vgalatro committed Jan 22, 2024
1 parent 62cb88c commit 3953b43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions blocks/card-list-block/features/card-list/default.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ const CardListItems = (props) => {
displayAmount,
},
targetFallbackImage,
dateLocalization: { language, timeZone, dateFormat } = {
dateLocalization: { language, timeZone, dateTimeFormat } = {
language: "en",
timeZone: "GMT",
dateFormat: "%B %d, %Y at %l:%M%p %Z",
dateTimeFormat: "%B %d, %Y at %l:%M%p %Z",
},
} = props;
const phrases = usePhrases();
Expand Down Expand Up @@ -135,7 +135,7 @@ const CardListItems = (props) => {

const sourceContent = contentElements[0];

const displayDate = localizeDateTime(sourceContent.display_date, dateFormat, language, timeZone);
const displayDate = localizeDateTime(sourceContent.display_date, dateTimeFormat, language, timeZone);

/* Author Formatting */
const bylineNodes = formatAuthors(sourceContent?.credits?.by, phrases.t("global.and-text"));
Expand Down Expand Up @@ -270,8 +270,7 @@ const CardListItems = (props) => {

const CardList = ({ customFields }) => {
const { id, arcSite, contextPath, deployment, isAdmin } = useFusionContext();
const { websiteDomain, fallbackImage, primaryLogoAlt } = getProperties(arcSite);

const { dateLocalization, fallbackImage, primaryLogoAlt, websiteDomain } = getProperties(arcSite);
const targetFallbackImage = getFallbackImageURL({
deployment,
contextPath,
Expand All @@ -288,6 +287,7 @@ const CardList = ({ customFields }) => {
<CardListItems
id={id}
customFields={customFields}
dateLocalization={dateLocalization}
targetFallbackImage={targetFallbackImage}
websiteDomain={websiteDomain}
primaryLogoAlt={primaryLogoAlt}
Expand Down

0 comments on commit 3953b43

Please sign in to comment.