Skip to content

Refactor ProjectCard class to function component#991

Merged
talyssonoc merged 3 commits intomasterfrom
refactor/projectcard-class-to-function
May 9, 2025
Merged

Refactor ProjectCard class to function component#991
talyssonoc merged 3 commits intomasterfrom
refactor/projectcard-class-to-function

Conversation

@julialbq
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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 { project, joined } = this.props;
};

const panelBody = () => {
Copy link
Copy Markdown
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 { project, joined } = this.props;
};

const renderUsersAvatar = () => {
Copy link
Copy Markdown
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