From 3f5048f647b223c9dcb11e4b962af590bb90bb0f Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 8 Aug 2023 10:25:35 +0300 Subject: [PATCH] TAL-32 start hiting intake form --- .../HiringFormModal/HiringFormModal.tsx | 48 +++++++ .../profile-header/HiringFormModal/index.ts | 1 + .../profile-header/ProfileHeader.module.scss | 76 +++++++---- .../profile-header/ProfileHeader.tsx | 127 +++++++++++------- 4 files changed, 179 insertions(+), 73 deletions(-) create mode 100644 src/apps/profiles/src/member-profile/profile-header/HiringFormModal/HiringFormModal.tsx create mode 100644 src/apps/profiles/src/member-profile/profile-header/HiringFormModal/index.ts diff --git a/src/apps/profiles/src/member-profile/profile-header/HiringFormModal/HiringFormModal.tsx b/src/apps/profiles/src/member-profile/profile-header/HiringFormModal/HiringFormModal.tsx new file mode 100644 index 000000000..eea5d7e30 --- /dev/null +++ b/src/apps/profiles/src/member-profile/profile-header/HiringFormModal/HiringFormModal.tsx @@ -0,0 +1,48 @@ +import { FC } from 'react' + +import { UserProfile } from '~/libs/core' +import { BaseModal } from '~/libs/ui' + +interface HiringFormModalProps { + onClose: () => void + authProfile: UserProfile | undefined + profile: UserProfile + searchedSkills: string[] +} + +function populateIframeForm(profile: UserProfile, authProfile: any | undefined, searchedSkills: string[]): string { + const formUrl = `https://go.topcoder.com/talent-search-intake?handle=${profile.handle}` + + if (authProfile) { + return `${formUrl} +&first_name=${authProfile.firstName} +&last_name=${authProfile.lastName} +&email=${authProfile.email} +&searched_skills=${searchedSkills.join(',')}` + } + + return formUrl +} + +const HiringFormModal: FC = (props: HiringFormModalProps) => ( + + Interested in working with one of our experts? +
+ Start with this form. +

+ )} + size='lg' + > +