Skip to content

Commit 26ee3b3

Browse files
authored
Merge pull request #1114 from topcoder-platform/pm-1273_1
fix(PM-1273): remove members from copilot response and use canApplyAsCopilot
2 parents 70c8f4a + a6c733a commit 26ee3b3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/apps/copilots/src/models/CopilotOpportunity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ export interface CopilotOpportunity {
2222
startDate: Date,
2323
tzRestrictions: 'yes' | 'no',
2424
createdAt: Date,
25-
members: Array<number>,
25+
canApplyAsCopilot: boolean,
2626
}

src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ const CopilotOpportunityDetails: FC<{}> = () => {
125125
}
126126

127127
const application = copilotApplications && copilotApplications[0]
128-
const isAlreadyMemberOfTheProject = profile && opportunity?.members?.includes(profile.userId)
129128

130129
return (
131130
<ContentLayout
@@ -135,7 +134,7 @@ const CopilotOpportunityDetails: FC<{}> = () => {
135134
&& copilotApplications
136135
&& copilotApplications.length === 0
137136
&& opportunity?.status === 'active'
138-
&& !isAlreadyMemberOfTheProject ? applyCopilotOpportunityButton : undefined
137+
&& opportunity?.canApplyAsCopilot ? applyCopilotOpportunityButton : undefined
139138
}
140139
infoComponent={(isCopilot && !(copilotApplications
141140
&& copilotApplications.length === 0

0 commit comments

Comments
 (0)