Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-580

What's in this PR?

  • show invite button only for active projects

}
{activeTab === CopilotDetailsTabViews.details && <OpportunityDetails opportunity={opportunity} />}
{activeTab === CopilotDetailsTabViews.applications && isAdminOrPM && (
{activeTab === CopilotDetailsTabViews.applications && isAdminOrPM && opportunity && (

Choose a reason for hiding this comment

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

Consider checking if opportunity is not null or undefined before using it in the condition. This ensures that the CopilotApplications component is only rendered when opportunity is valid.

!isInvited && copilotApplication.status === CopilotApplicationStatus.PENDING && (
!isInvited
&& copilotApplication.status === CopilotApplicationStatus.PENDING
&& copilotApplication.opportunityStatus === 'active' && (

Choose a reason for hiding this comment

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

Consider using a constant or enum for the string 'active' to avoid potential typos and to make the code more maintainable.

@hentrymartin hentrymartin merged commit 2bf40eb into dev May 28, 2025
3 checks passed
@hentrymartin hentrymartin deleted the pm-580_1 branch May 28, 2025 11:34
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.

2 participants