Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT] Use league specific avatar before defaulting to sleeper profile avatar #156

Closed
goingthisway opened this issue Sep 14, 2022 · 1 comment · Fixed by #185
Closed
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@goingthisway
Copy link

goingthisway commented Sep 14, 2022

Is your feature request related to a problem? Please describe.
If a user does not have a sleeper profile pic, the website shows a null picture.

Describe the solution you'd like
By replacing the avatar fetch with an if statement that tries to use the team picture before defaulting to the profile picture, we can avoid null picture

Code Change:
Replace https://sleepercdn.com/avatars/thumbs/${user.avatar}
With

user.metadata.avatar ? user.metadata.avatar : `https://sleepercdn.com/avatars/thumbs/${user.avatar}`
@goingthisway goingthisway added the enhancement New feature or request label Sep 14, 2022
@nmelhado nmelhado added the good first issue Good for newcomers label Sep 19, 2022
@nmelhado
Copy link
Owner

nmelhado commented Jan 8, 2023

Lumping this in to the upcoming update. Should be released in the next week or two!

@nmelhado nmelhado linked a pull request Jan 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants