Skip to content

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

Merged
merged 3 commits into from
May 9, 2025

Conversation

julialbq
Copy link
Collaborator

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)

@julialbq julialbq changed the title Refactor ProjectSearch class to function component Refactor ProjectCard class to function component Feb 25, 2025
return textArea.value;
};

const renderTag = () => {
Copy link
Member

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'));
Copy link
Member

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 = () => {
Copy link
Member

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 = () => {
Copy link
Member

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.

@julialbq julialbq force-pushed the refactor/projectcard-class-to-function branch from 3e2f195 to cc6db62 Compare March 25, 2025 18:02
@talyssonoc talyssonoc merged commit 19238f2 into master May 9, 2025
2 of 3 checks passed
@talyssonoc talyssonoc deleted the refactor/projectcard-class-to-function branch May 9, 2025 03:59
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.

4 participants