Skip to content

Commit 83aa2ae

Browse files
authored
Merge pull request #775 from topcoder-platform/profiles-app
Profiles app -> dev
2 parents 57d2c75 + 0d2a476 commit 83aa2ae

File tree

20 files changed

+309
-229
lines changed

20 files changed

+309
-229
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
@import "@libs/ui/styles/includes";
22

33
.editMemberPropertyBtn {
4+
padding: 0 !important;
5+
padding-left: $sp-4 !important;
6+
color: $black-100;
7+
48
svg {
5-
width: 16px;
6-
height: 16px;
9+
width: 20px;
10+
height: 20px;
711
}
812
}

src/apps/profiles/src/components/EditMemberPropertyBtn/EditMemberPropertyBtn.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const EditMemberPropertyBtn: FC<EditMemberPropertyBtnProps> = (props: EditMember
1313
icon={IconOutline.PencilIcon}
1414
onClick={props.onClick}
1515
className={styles.editMemberPropertyBtn}
16+
size='lg'
1617
/>
1718
)
1819

src/apps/profiles/src/lib/helpers.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,18 @@ export function notifyUniNavi(profile: UserProfile): void {
2121
})
2222
}
2323
}
24+
25+
export function subTrackLabelToHumanName(label: string): string {
26+
switch (label) {
27+
case 'ASSEMBLY_COMPETITION':
28+
return 'Assembly Competition'
29+
case 'CODE':
30+
return 'Code'
31+
case 'FIRST_2_FINISH':
32+
return 'First2Finish'
33+
case 'CONCEPTUALIZATION':
34+
return 'Conceptualization'
35+
default: return label
36+
}
37+
38+
}

src/apps/profiles/src/member-profile/education-and-certifications/EducationAndCertifications.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.headerWrap {
99
display: flex;
1010
align-items: center;
11+
justify-content: space-between;
1112
margin-bottom: $sp-4;
1213

1314
h3 {

src/apps/profiles/src/member-profile/languages/MemberLanguages.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.titleWrap {
99
display: flex;
1010
align-items: center;
11-
justify-content: flex-start;
11+
justify-content: space-between;
1212
margin-bottom: $sp-2;
1313
}
1414

src/apps/profiles/src/member-profile/links/MemberLinks.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.titleWrap {
99
display: flex;
1010
align-items: center;
11-
justify-content: flex-start;
11+
justify-content: space-between;
1212
margin-bottom: $sp-2;
1313
}
1414

src/apps/profiles/src/member-profile/profile-header/OpenForGigsModifyModal/OpenForGigsModifyModal.module.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
.modalBody {
1010
display: flex;
11-
align-items: center;
12-
justify-content: space-between;
11+
flex-direction: column;
12+
13+
>p {
14+
margin-bottom: $sp-4;
15+
}
1316
}

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'
22
import { toast } from 'react-toastify'
33
import { reject } from 'lodash'
44

5-
import { BaseModal, Button, FormToggleSwitch } from '~/libs/ui'
5+
import { BaseModal, Button, InputText } from '~/libs/ui'
66
import {
77
createMemberTraitsAsync,
88
updateMemberTraitsAsync,
@@ -76,7 +76,8 @@ const OpenForGigsModifyModal: FC<OpenForGigsModifyModalProps> = (props: OpenForG
7676
<BaseModal
7777
onClose={props.onClose}
7878
open
79-
title='Gig Availability'
79+
title='Don’t miss gig and work opportunities.'
80+
size='lg'
8081
buttons={(
8182
<div className={styles.modalButtons}>
8283
<Button
@@ -95,15 +96,15 @@ const OpenForGigsModifyModal: FC<OpenForGigsModifyModalProps> = (props: OpenForG
9596
>
9697
<div className={styles.modalBody}>
9798
<p>
98-
{openForWork
99-
? 'Currently available for work.'
100-
: `Mark your availability to get found in search results when potential
101-
clients look for services and let them reach out to you for free.`}
99+
By selecting “Open to Work” our customers will know that you are available for job opportunities.
102100
</p>
103-
<FormToggleSwitch
101+
<InputText
104102
name='openForWork'
103+
label='Yes, I’m open to work'
104+
tabIndex={-1}
105+
type='checkbox'
105106
onChange={handleOpenForWorkToggle}
106-
value={openForWork}
107+
checked={openForWork}
107108
/>
108109
</div>
109110
</BaseModal>

src/apps/profiles/src/member-profile/profile-header/ProfileHeader.module.scss

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,6 @@
1111
position: relative;
1212
margin-right: 60px;
1313

14-
.verifiedBadge {
15-
position: absolute;
16-
right: 0;
17-
top: 0;
18-
color: $tc-white;
19-
20-
svg {
21-
width: 70px;
22-
height: 70px;
23-
fill: $turq-120;
24-
25-
path {
26-
fill: $turq-120;
27-
}
28-
}
29-
}
30-
3114
.profilePhoto {
3215
width: 300px;
3316
height: 300px;
@@ -38,14 +21,11 @@
3821

3922
button {
4023
position: absolute;
41-
right: 0;
42-
top: calc(50% - 8px);
43-
padding-right: $sp-1;
44-
45-
svg {
46-
width: 16px;
47-
height: 16px;
48-
}
24+
bottom: -10px;
25+
left: calc(50% - 20px);
26+
padding: $sp-2 $sp-3 !important;
27+
background-color: $tc-white;
28+
border-radius: 50%;
4929
}
5030
}
5131

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

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ import { KeyedMutator } from 'swr'
55
import moment from 'moment'
66

77
import {
8-
getVerificationStatusAsync,
98
useMemberTraits,
109
UserProfile,
1110
UserTrait,
1211
UserTraitIds,
1312
UserTraits,
1413
} from '~/libs/core'
15-
import { Button, IconOutline } from '~/libs/ui'
14+
import { Button } from '~/libs/ui'
1615

1716
import { EditMemberPropertyBtn } from '../../components'
1817
import { EDIT_MODE_QUERY_PARAM, profileEditModes } from '../../config'
@@ -34,9 +33,6 @@ const DEFAULT_MEMBER_AVATAR: string
3433
const ProfileHeader: FC<ProfileHeaderProps> = (props: ProfileHeaderProps) => {
3534
const photoURL: string = props.profile.photoURL || DEFAULT_MEMBER_AVATAR
3635

37-
const [isMemberVerified, setIsMemberVerified]: [boolean, Dispatch<SetStateAction<boolean>>]
38-
= useState<boolean>(false)
39-
4036
const canEdit: boolean = props.authProfile?.handle === props.profile.handle
4137

4238
const [isNameEditMode, setIsNameEditMode]: [boolean, Dispatch<SetStateAction<boolean>>]
@@ -76,15 +72,6 @@ const ProfileHeader: FC<ProfileHeaderProps> = (props: ProfileHeaderProps) => {
7672
// eslint-disable-next-line react-hooks/exhaustive-deps
7773
}, [props.authProfile])
7874

79-
useEffect(() => {
80-
if (!props.profile?.handle) {
81-
return
82-
}
83-
84-
getVerificationStatusAsync(props.profile.handle)
85-
.then(verified => setIsMemberVerified(verified))
86-
}, [props.profile.handle])
87-
8875
function handleHireMeClick(): void {
8976
console.log('Hire Me button clicked')
9077
}
@@ -124,13 +111,6 @@ const ProfileHeader: FC<ProfileHeaderProps> = (props: ProfileHeaderProps) => {
124111
<div className={styles.container}>
125112
<div className={styles.photoWrap}>
126113
<img src={photoURL} alt='Topcoder - Member Profile Avatar' className={styles.profilePhoto} />
127-
{
128-
isMemberVerified ? (
129-
<div className={styles.verifiedBadge}>
130-
<IconOutline.CheckCircleIcon />
131-
</div>
132-
) : undefined
133-
}
134114
{
135115
canEdit && (
136116
<EditMemberPropertyBtn

0 commit comments

Comments
 (0)