-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make the inbox items avatars clickable #2240 #2274
Conversation
✅ Deploy Preview for preview-common ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
alt={imageAlt} | ||
/> | ||
)} | ||
<div onClick={handleAvatarClick}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move click handler outside of this component to the parents which use it and pass the callback as onImageClick
prop. So the component at least will not know about the dm user and such kind of things which are not related to the component itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreymikhadyuk I'm not sure I understood what's the issue with that. Currently the handleAvatarClick
is only being used there, and data like dmUserId
is necessary for this. So if it's being used only here, why should we define the function outside and pass it by props...
Development
section of this PR.What was changed?