-
Notifications
You must be signed in to change notification settings - Fork 77
Refactor ProjectCard class to function component #991
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
Conversation
return textArea.value; | ||
}; | ||
|
||
const renderTag = () => { |
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.
Instead of creating an inline function, what do you think about creating a separate component just for that? We can keep it in this file, as long as it's not inside the ProjectCard
component. It can be in the bottom of the file.
|
||
panelHeading() { | ||
const { project, joined } = this.props; | ||
const projectName = () => decodeHTML(project.get('name')); |
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 think we can look if there's a better option to do that instead of using createElement
as well.
|
||
const panelBody = () => { |
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.
We might be able to create a separate component for that as well.
|
||
const renderUsersAvatar = () => { |
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.
We might be able to create a separate component for that as well.
3e2f195
to
cc6db62
Compare
… reviewer suggestion
What this PR do ?
Updates ProjectCard class into a function component.
Related Issues
Update React classes to function components
Screenshots (if applicable)
Additional Notes (if any)