From a747a87af8fb71358c82fc0ab2b61cc6326379b9 Mon Sep 17 00:00:00 2001 From: Ritesh Hiremath Date: Sat, 26 Oct 2024 22:08:39 +0530 Subject: [PATCH] Some changes in string concatenation --- pages/blog/index.page.tsx | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/pages/blog/index.page.tsx b/pages/blog/index.page.tsx index eee7e04fd..da350c45b 100644 --- a/pages/blog/index.page.tsx +++ b/pages/blog/index.page.tsx @@ -301,16 +301,24 @@ export default function StaticMarkdownPage({ >
{(frontmatter.authors || []).map( - (author: Author, index: number) => ( -
2 ? 'h-8 w-8' : 'h-11 w-11'} rounded-full -ml-3 bg-cover bg-center border-2 border-white`} - style={{ - backgroundImage: `url(${author.photo})`, - zIndex: 10 - index, - }} - /> - ), + (author: Author, index: number) => { + const isMultipleAuthors = + frontmatter.authors.length > 2; + const sizeClass = isMultipleAuthors + ? 'h-8 w-8' + : 'h-11 w-11'; + + return ( +
+ ); + }, )}