diff --git a/src/apps/copilots/src/models/CopilotOpportunity.ts b/src/apps/copilots/src/models/CopilotOpportunity.ts index 891dfffbb..b53545377 100644 --- a/src/apps/copilots/src/models/CopilotOpportunity.ts +++ b/src/apps/copilots/src/models/CopilotOpportunity.ts @@ -22,5 +22,5 @@ export interface CopilotOpportunity { startDate: Date, tzRestrictions: 'yes' | 'no', createdAt: Date, - members: Array, + canApplyAsCopilot: boolean, } diff --git a/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx b/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx index 7b1dbacf3..b3d5707eb 100644 --- a/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx +++ b/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx @@ -125,7 +125,6 @@ const CopilotOpportunityDetails: FC<{}> = () => { } const application = copilotApplications && copilotApplications[0] - const isAlreadyMemberOfTheProject = profile && opportunity?.members?.includes(profile.userId) return ( = () => { && copilotApplications && copilotApplications.length === 0 && opportunity?.status === 'active' - && !isAlreadyMemberOfTheProject ? applyCopilotOpportunityButton : undefined + && opportunity?.canApplyAsCopilot ? applyCopilotOpportunityButton : undefined } infoComponent={(isCopilot && !(copilotApplications && copilotApplications.length === 0