From a3c16e313af4796dc85c2e8dc5203a6d2df1871b Mon Sep 17 00:00:00 2001 From: Hentry Martin Date: Wed, 18 Jun 2025 21:17:10 +0530 Subject: [PATCH] fix: show types propertly in opportunity details page --- .../copilot-opportunity-details/index.tsx | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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..1826eadda 100644 --- a/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx +++ b/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx @@ -35,6 +35,7 @@ import { } from '../../services/copilot-opportunities' import { FormattedMembers, useMembers } from '../../services/members' import { copilotRoutesMap } from '../../copilots.routes' +import { ProjectType } from '../../constants' import { ApplyOpportunityModal } from './apply-opportunity-modal' import { @@ -127,6 +128,21 @@ const CopilotOpportunityDetails: FC<{}> = () => { const application = copilotApplications && copilotApplications[0] const isAlreadyMemberOfTheProject = profile && opportunity?.members?.includes(profile.userId) + const getOpportunityType = (type: string): ProjectType => { + switch (type) { + case 'ai': + return ProjectType.ai + case 'datascience': + return ProjectType.datascience + case 'dev': + return ProjectType.developement + case 'design': + return ProjectType.design + default: + return ProjectType.qa + } + } + return ( = () => {
Type - {opportunity?.type} + + {opportunity?.type && getOpportunityType(opportunity?.type)} +