Skip to content

Fixed an issue where an image skeleton is shown if the image url is null#336

Merged
stasel merged 1 commit into
mainfrom
frontend/trainee-avatar-fix
May 6, 2026
Merged

Fixed an issue where an image skeleton is shown if the image url is null#336
stasel merged 1 commit into
mainfrom
frontend/trainee-avatar-fix

Conversation

@stasel

@stasel stasel commented May 6, 2026

Copy link
Copy Markdown
Member

Correct behavior is to show the default avatar image just like the on error

Before:
image

After:
image

Copilot AI review requested due to automatic review settings May 6, 2026 13:29
@HackYourFutures HackYourFutures temporarily deployed to dojo-frontend-trainee-a-acihaz May 6, 2026 13:29 Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the TraineeAvatar component rendering logic so that a missing/empty image URL doesn’t show the loading skeleton and instead falls back directly to a placeholder Avatar.

Changes:

  • Return a fallback Avatar when imageURL is falsy or when an image load error occurs.
  • Simplify the <img> inline style by removing a redundant conditional display assignment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/src/features/cohorts/components/TraineeAvatar.tsx Outdated
@dojo-security-review

This comment has been minimized.

@stasel stasel force-pushed the frontend/trainee-avatar-fix branch from 79c32c3 to 9381676 Compare May 6, 2026 13:34
@stasel stasel requested a review from Copilot May 6, 2026 13:34
@HackYourFutures HackYourFutures temporarily deployed to dojo-frontend-trainee-a-acihaz May 6, 2026 13:34 Inactive
@dojo-security-review

Copy link
Copy Markdown

Security Review — no issues found

The PR modifies a single React component (TraineeAvatar.tsx) with two minor UI fixes: an early-return guard for empty imageURL strings and a simplified display style value. No security-relevant patterns (XSS vectors, untrusted data handling, auth, etc.) were introduced.

Generated by PR Security Review for issue #336 · ● 77.5K ·

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread client/src/features/cohorts/components/TraineeAvatar.tsx
@stasel stasel merged commit 0ff06ad into main May 6, 2026
12 checks passed
@stasel stasel deleted the frontend/trainee-avatar-fix branch May 6, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants