Skip to content

fix(ui): avatar image performance #307

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

Merged
merged 7 commits into from
Mar 29, 2023

Conversation

JoltCode
Copy link
Collaborator

Description

Implements next/image to the avatar image

Fixes #306 (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated .env.example if I added a new environment variable
  • My PR title follows the semantic commits style

@vercel
Copy link

vercel bot commented Mar 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
answer-overflow ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 29, 2023 at 5:45PM (UTC)
answer-overflow-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 29, 2023 at 5:45PM (UTC)
answer-overflow-storybook ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 29, 2023 at 5:45PM (UTC)

@vercel
Copy link

vercel bot commented Mar 28, 2023

@JoltCode is attempting to deploy a commit to the AnswerOverflow Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #307 (e1b6cb3) into main (a718e05) will increase coverage by 84.52%.
The diff coverage is n/a.

❗ Current head e1b6cb3 differs from pull request most recent head 83cd48f. Consider uploading reports for the commit 83cd48f to get more accurate results

@@            Coverage Diff            @@
##           main     #307       +/-   ##
=========================================
+ Coverage      0   84.52%   +84.52%     
=========================================
  Files         0      134      +134     
  Lines         0    11497    +11497     
  Branches      0     1531     +1531     
=========================================
+ Hits          0     9718     +9718     
- Misses        0     1523     +1523     
- Partials      0      256      +256     

see 134 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

className={cn('aspect-square h-full w-full ', className)}
src={src}
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove src here

{...props}
/>
>
<Image src={src ?? ''} width={48} height={48} alt={alt ?? ''} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe do a <> </> blank component if src is null

Copy link
Collaborator

Choose a reason for hiding this comment

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

dont hardcode sizes, get it from the passed in size

@RhysSullivan RhysSullivan marked this pull request as ready for review March 29, 2023 17:30
@RhysSullivan RhysSullivan merged commit 8ffb3cf into AnswerOverflow:main Mar 29, 2023
@JoltCode JoltCode deleted the ui-hero-image-perf branch March 30, 2023 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚛ component Issue relates to a react component 🖥️website Relates to the website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(ui): avatar image performance
2 participants