Skip to content

Commit

Permalink
Some changes in string concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritesh Hiremath authored and Ritesh Hiremath committed Oct 26, 2024
1 parent 86a8dfe commit a747a87
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions pages/blog/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,24 @@ export default function StaticMarkdownPage({
>
<div className='flex flex-row pl-2 mr-2'>
{(frontmatter.authors || []).map(
(author: Author, index: number) => (
<div
key={index}
className={`bg-slate-50 ${frontmatter.authors.length > 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 (
<div
key={index}
className={`bg-slate-50 rounded-full -ml-3 bg-cover bg-center border-2 border-white ${sizeClass}`}
style={{
backgroundImage: `url(${author.photo})`,
zIndex: 10 - index,
}}
/>
);
},
)}
</div>

Expand Down

0 comments on commit a747a87

Please sign in to comment.