Description
On the Careers page (/careers), the "What Our Team Says" testimonial carousel currently ignores the avatar field defined in the testimonials array and always displays a generic Lucide User icon instead.
Although testimonial objects contain avatar paths such as:
avatar: "/img/testimonial-sarah.jpg"
the UI does not render these images.
Current implementation:
<div className="mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-br from-blue-400 to-purple-500 shadow-inner">
<User className="h-10 w-10 text-white" />
</div>
Additionally, the referenced testimonial image assets are missing from static/img.
Expected Behavior
- Display contributor avatar images when the
avatar field exists
- Fall back to the default
User icon if the image fails to load
- Ensure valid testimonial image assets are available
Suggested Solution
Update the avatar section in src/pages/careers/index.tsx to conditionally render the contributor image.
Proposed Code
<div className="mx-auto mb-6 h-20 w-20 relative rounded-full bg-gradient-to-br from-blue-400 to-purple-500 shadow-inner overflow-hidden flex items-center justify-center">
{testimonials[activeTestimonial].avatar ? (
<img
src={testimonials[activeTestimonial].avatar}
alt={testimonials[activeTestimonial].name}
className="h-full w-full object-cover"
onError={(e) => {
// Fallback if image fails to load
e.currentTarget.style.display = 'none';
}}
/>
) : (
<User className="h-10 w-10 text-white" />
)}
</div>
Benefits
- Improves UI personalization
- Makes testimonials visually engaging
- Properly utilizes existing testimonial data
- Adds graceful fallback handling for missing images
Files to Update
src/pages/careers/index.tsx
static/img/* (if local avatar assets are added)
Description
On the Careers page (
/careers), the "What Our Team Says" testimonial carousel currently ignores theavatarfield defined in the testimonials array and always displays a generic LucideUsericon instead.Although testimonial objects contain avatar paths such as:
avatar: "/img/testimonial-sarah.jpg"the UI does not render these images.
Current implementation:
Additionally, the referenced testimonial image assets are missing from
static/img.Expected Behavior
avatarfield existsUsericon if the image fails to loadSuggested Solution
Update the avatar section in
src/pages/careers/index.tsxto conditionally render the contributor image.Proposed Code
Benefits
Files to Update
src/pages/careers/index.tsxstatic/img/*(if local avatar assets are added)