Hi,
Thank you for providing me the prompt.
From your advise, I just added the “if condition” to archive.jsx of templates directory like the below code.
I thought that this code seemed to be logically correct to show different contents for each language but every contents in both language did not show up at all like the screenshot I attached with chat.
Is there any notice you think ?
After adding if condition
<SectionWrapper isBlog>
<SectionContainerGridThreeCols>
{blogPostNodes.map(
({
id,
meta: { firstPublishedAt },
minutesOfReading,
cardImage,
title,
subtitle,
author,
slug,
}) => {
if (title)
return
(
<ArticleCard>
key={id}
date={firstPublishedAt}
time={`${minutesOfReading} ${minsReadSuffix}`}
cardImg={
cardImage &&
CardImgArtDir(
cardImage.gatsbyImageData,
cardImage.squaredImage,
cardImage.alt
)
}
title={title}
excerpt={subtitle}
authorImg={author?.picture.gatsbyImageData}
authorAltImg={author?.picture.alt}
authorName={author?.name}
slug={slug}
</ArticleCard>
)
}
)}
</SectionContainerGridThreeCols>
Before adding if condition which is original code of repository.
<SectionWrapper isBlog>
<SectionContainerGridThreeCols>
{blogPostNodes.map(
({
id,
meta: { firstPublishedAt },
minutesOfReading,
cardImage,
title,
subtitle,
author,
slug,
}) => (
<ArticleCard
key={id}
date={firstPublishedAt}
time={`${minutesOfReading} ${minsReadSuffix}`}
cardImg={
cardImage &&
CardImgArtDir(
cardImage.gatsbyImageData,
cardImage.squaredImage,
cardImage.alt
)
}
title={title}
excerpt={subtitle}
authorImg={author?.picture.gatsbyImageData}
authorAltImg={author?.picture.alt}
authorName={author?.name}
slug={slug}
/>
)
)}
</SectionContainerGridThreeCols>