Skip to content

Commit

Permalink
added changes based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
akshatnema committed Oct 11, 2024
1 parent 3a87764 commit 8cbd9e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ export default function Avatar({ name, photo, link, className }: AvatarProps) {
);

return link ? (
<span
<button
onClick={(e) => {
e.preventDefault();

window.open(link, '_blank');
}}
data-testid='Avatars-link'
className='cursor-pointer border-none bg-inherit p-0'
>
{avatar}
</span>
</button>
) : (
<React.Fragment>{avatar}</React.Fragment>
);
Expand Down
5 changes: 3 additions & 2 deletions components/navigation/BlogPostItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ export default forwardRef(function BlogPostItem(
{post.authors
.map((author, index) =>
author.link ? (
<span
<button
key={index}
data-alt={author.name}
className='cursor-pointer border-none bg-inherit p-0 hover:underline'
onClick={(e) => {
e.preventDefault();

Expand All @@ -107,7 +108,7 @@ export default forwardRef(function BlogPostItem(
}}
>
{author.name}
</span>
</button>
) : (
author.name
)
Expand Down
5 changes: 4 additions & 1 deletion components/tools/ToolsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ export default function ToolsCard({ toolData }: ToolsCardProp) {
}, 500)
}
>
<span ref={descriptionRef} className={`line-clamp-3 ${isTruncated && 'after:content-["..."]'}`}>
<span
ref={descriptionRef}
className={`line-clamp-3 inline-block ${isTruncated && 'after:ml-1 after:content-["..."]'}`}
>
{toolData.description}
</span>
</span>
Expand Down

0 comments on commit 8cbd9e3

Please sign in to comment.