Skip to content

Commit 53810c5

Browse files
authored
feat: add equity to OpportunityMeta (#5026)
1 parent 009429c commit 53810c5

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

packages/shared/src/features/opportunity/graphql.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export const OPPORTUNITY_FRAGMENT = gql`
9898
max
9999
period
100100
}
101+
equity
101102
}
102103
location {
103104
type

packages/shared/src/features/opportunity/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export type OpportunityMeta = {
5858
salary?: Salary;
5959
seniorityLevel?: ProtoEnumValue;
6060
roleType?: number;
61+
equity?: boolean;
6162
};
6263

6364
export type Keyword = {

packages/webapp/pages/opportunity/[id]/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ const metaMap = {
245245
transformer: (value: Opportunity['location']) =>
246246
locationTypeMap[value?.[0]?.type || LocationType.UNSPECIFIED],
247247
},
248+
equity: {
249+
title: 'Equity',
250+
transformer: (value: OpportunityMeta['equity']) =>
251+
value ? 'Included' : null,
252+
},
248253
seniorityLevel: {
249254
title: 'Seniority level',
250255
transformer: (value: OpportunityMeta['seniorityLevel']) =>
@@ -492,6 +497,10 @@ const JobPage = (): ReactElement => {
492497
? opportunity.location
493498
: opportunity.meta[metaKey];
494499

500+
if (value === false || value === null) {
501+
return false;
502+
}
503+
495504
return (
496505
<Fragment key={metaKey}>
497506
<Typography

0 commit comments

Comments
 (0)