Skip to content

Commit 897e191

Browse files
authored
Merge pull request #820 from topcoder-platform/issue-818
From 'Not open to work' to 'Open to work' status update from profile page is not reflected in onboarding app
2 parents cd79f6b + e45e387 commit 897e191

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/apps/profiles/src/member-profile/profile-header/OpenForGigs/OpenForGigs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const OpenForGigs: FC<OpenForGigsProps> = (props: OpenForGigsProps) => {
4040

4141
const openForWork: UserTrait | undefined
4242
= useMemo(() => memberPersonalizationTraits?.[0]?.traits?.data?.find(
43-
(trait: UserTrait) => trait.availableForGigs,
43+
(trait: UserTrait) => trait.availableForGigs !== undefined,
4444
), [memberPersonalizationTraits])
4545

4646
function handleModifyOpenForWorkClick(): void {

src/apps/profiles/src/member-profile/profile-header/OpenForGigsModifyModal/OpenForGigsModifyModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ const OpenForGigsModifyModal: FC<OpenForGigsModifyModalProps> = (props: OpenForG
4242
setIsSaving(true)
4343

4444
const updatedPersonalizationTraits: UserTrait[]
45-
= reject(props.memberPersonalizationTraitsFullData, (trait: UserTrait) => !!trait.availableForGigs)
45+
= reject(
46+
props.memberPersonalizationTraitsFullData,
47+
(trait: UserTrait) => trait.availableForGigs !== undefined,
48+
)
4649

4750
methodsMap[!!props.memberPersonalizationTraitsFullData ? 'update' : 'create'](props.profile.handle, [{
4851
categoryName: UserTraitCategoryNames.personalization,

0 commit comments

Comments
 (0)