- {linkifyText(text)} + {renderPortableTextSpans(block.children, block.markDefs)}
); } @@ -320,9 +351,7 @@ export default async function PostDetails({ {item.author?.name && {item.author.name}} {item.author?.name && item.publishedAt && ·} {item.publishedAt && ( - - {new Date(item.publishedAt).toLocaleDateString()} - + {formatBlogDate(item.publishedAt)} )} )} diff --git a/frontend/app/[locale]/blog/category/[category]/page.tsx b/frontend/app/[locale]/blog/category/[category]/page.tsx index af501d25..05296614 100644 --- a/frontend/app/[locale]/blog/category/[category]/page.tsx +++ b/frontend/app/[locale]/blog/category/[category]/page.tsx @@ -5,6 +5,7 @@ import Image from 'next/image'; import { client } from '@/client'; import { Link } from '@/i18n/routing'; import { BlogCategoryGrid } from '@/components/blog/BlogCategoryGrid'; +import { formatBlogDate } from '@/lib/blog/date'; export const revalidate = 0; @@ -79,13 +80,7 @@ export default async function BlogCategoryPage({ const featuredPost = posts[0]; const restPosts = posts.slice(1); - const featuredDate = featuredPost?.publishedAt - ? new Intl.DateTimeFormat(locale, { - day: '2-digit', - month: '2-digit', - year: 'numeric', - }).format(new Date(featuredPost.publishedAt)) - : ''; + const featuredDate = formatBlogDate(featuredPost?.publishedAt); return (- {author.name} -
- )} - - {hasMeta && ( -- {author?.jobTitle && {author.jobTitle}} - {author?.jobTitle && - (author?.company || author?.city) && · } - {author?.company && {author.company}} - {author?.company && author?.city && · } - {author?.city && {author.city}} -
- )} -- Bio -
-- {bioText} -
-- Social links -
- -+ {[ + selectedAuthorData.jobTitle, + selectedAuthorData.company, + selectedAuthorData.city, + ] + .filter(Boolean) + .join(' · ')} +
+ )} {authorBioText && ({authorBioText}
)} + {selectedAuthorData.socialMedia?.length ? ( +