diff --git a/.environments/.env.prod b/.environments/.env.prod index 99840204a..bac66716c 100644 --- a/.environments/.env.prod +++ b/.environments/.env.prod @@ -14,7 +14,7 @@ REACT_APP_DATADOG_PUBLIC_TOKEN=puba0825671e469d16f940c5a30dc738f11 REACT_APP_MEMBER_VERIFY_LOOKER=3322 -REACT_APP_SPRIG_ENV_ID=bUcousVQ0-yF +REACT_APP_SPRIG_ENV_ID=a-IZBZ6-r7bU # Filestack configuration for uploading Submissions REACT_APP_FILESTACK_API_KEY= diff --git a/src/apps/profiles/src/lib/helpers.ts b/src/apps/profiles/src/lib/helpers.ts index 4a1420d8a..6f644ffcd 100644 --- a/src/apps/profiles/src/lib/helpers.ts +++ b/src/apps/profiles/src/lib/helpers.ts @@ -71,6 +71,8 @@ export function subTrackLabelToHumanName(label: string): string { return 'Development' case 'ARCHITECTURE': return 'Architecture' + case 'UI_PROTOTYPE_COMPETITION': + return 'UI Prototype Competition' default: return label } diff --git a/src/apps/profiles/src/member-profile/MemberProfilePage.tsx b/src/apps/profiles/src/member-profile/MemberProfilePage.tsx index 521abac20..eebf6e893 100644 --- a/src/apps/profiles/src/member-profile/MemberProfilePage.tsx +++ b/src/apps/profiles/src/member-profile/MemberProfilePage.tsx @@ -31,7 +31,7 @@ const MemberProfilePage: FC<{}> = () => { if (routeParams.memberHandle) { profileGetPublicAsync(routeParams.memberHandle) .then(userProfile => { - setProfile(userProfile) + setProfile({ ...userProfile } as UserProfile) setProfileReady(true) }) // TODO: NOT FOUND PAGE redirect/dispaly @@ -41,7 +41,7 @@ const MemberProfilePage: FC<{}> = () => { const refreshProfile = useCallback((handle: string) => ( profileGetPublicAsync(handle) .then(userProfile => { - setProfile(userProfile) + setProfile({ ...userProfile } as UserProfile) if (userProfile) { notifyUniNavi(userProfile) triggerSprigSurvey(userProfile) diff --git a/src/apps/profiles/src/member-profile/education-and-certifications/EducationAndCertifications.tsx b/src/apps/profiles/src/member-profile/education-and-certifications/EducationAndCertifications.tsx index 6a695d489..103353020 100644 --- a/src/apps/profiles/src/member-profile/education-and-certifications/EducationAndCertifications.tsx +++ b/src/apps/profiles/src/member-profile/education-and-certifications/EducationAndCertifications.tsx @@ -14,7 +14,7 @@ import { import { EDIT_MODE_QUERY_PARAM, profileEditModes } from '../../config' import { AddButton, EditMemberPropertyBtn, EmptySection } from '../../components' import { MemberTCAInfo } from '../tca-info' -import { notifyUniNavi, triggerSprigSurvey } from '../../lib' +import { triggerSprigSurvey } from '../../lib' import { ModifyEducationModal } from './ModifyEducationModal' import { EducationCard } from './EducationCard' @@ -23,6 +23,7 @@ import styles from './EducationAndCertifications.module.scss' interface EducationAndCertificationsProps { profile: UserProfile authProfile: UserProfile | undefined + refreshProfile: (handle: string) => void } const EducationAndCertifications: FC = (props: EducationAndCertificationsProps) => { @@ -70,7 +71,7 @@ const EducationAndCertifications: FC = (props: setTimeout(() => { setIsEditMode(false) mutateTraits() - notifyUniNavi(props.profile) + props.refreshProfile(props.profile.handle) triggerSprigSurvey(props.profile) }, 1000) } diff --git a/src/apps/profiles/src/member-profile/page-layout/ProfilePageLayout.tsx b/src/apps/profiles/src/member-profile/page-layout/ProfilePageLayout.tsx index c55c5ddd3..24af66654 100644 --- a/src/apps/profiles/src/member-profile/page-layout/ProfilePageLayout.tsx +++ b/src/apps/profiles/src/member-profile/page-layout/ProfilePageLayout.tsx @@ -27,7 +27,6 @@ interface ProfilePageLayoutProps { } const ProfilePageLayout: FC = (props: ProfilePageLayoutProps) => ( -
{`${props.profile.handle} | Community Profile | Topcoder`} @@ -81,7 +80,7 @@ const ProfilePageLayout: FC = (props: ProfilePageLayoutP
{props.authProfile?.handle === props.profile.handle && ( - + )}
@@ -101,6 +100,7 @@ const ProfilePageLayout: FC = (props: ProfilePageLayoutP
@@ -108,6 +108,7 @@ const ProfilePageLayout: FC = (props: ProfilePageLayoutP
diff --git a/src/apps/profiles/src/member-profile/profile-completeness/ProfileCompleteness.tsx b/src/apps/profiles/src/member-profile/profile-completeness/ProfileCompleteness.tsx index 7a3dff4f5..10d87cdb4 100644 --- a/src/apps/profiles/src/member-profile/profile-completeness/ProfileCompleteness.tsx +++ b/src/apps/profiles/src/member-profile/profile-completeness/ProfileCompleteness.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react' +import { FC, useEffect } from 'react' import { useProfileCompleteness, UserProfile } from '~/libs/core' @@ -6,17 +6,21 @@ import styles from './ProfileCompleteness.module.scss' interface ProfileCompletenessProps { profile: UserProfile + authProfile: UserProfile } const ProfileCompleteness: FC = props => { - const completed = useProfileCompleteness(props.profile.handle) - const isLoading = completed === undefined + const completeness = useProfileCompleteness(props.profile.handle) + const completed = completeness.percent + const isLoading = completeness.isLoading const isCompleted = completed === 100 - const isCustomer = props.profile.roles.some(r => r.indexOf(' Customer') > -1) + const isCustomer = props.authProfile.roles.some(r => r.indexOf(' Customer') > -1) const hideCompletenessMeter = isLoading || isCompleted || isCustomer + useEffect(() => { completeness?.mutate() }, [props.profile]) + return hideCompletenessMeter ? <> : (
Profile: diff --git a/src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx b/src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx index a0f90a617..64f9c249d 100644 --- a/src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx +++ b/src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx @@ -86,7 +86,7 @@ const MemberSkillsInfo: FC = (props: MemberSkillsInfoProp