Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/shared/components/Gigs/GigApply/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export default function GigApply(props) {
recruitProfile,
} = props;
const retUrl = window.location.href;
const signupRetUrl = `${config.PLATFORM_SITE_URL}/onboard`;

const duration = getCustomField(job.custom_fields, 'Duration');
const isPlaced = _.find(_.isEmpty(recruitProfile) ? [] : recruitProfile.custom_fields, { field_id: 12 });

Expand Down Expand Up @@ -328,7 +326,7 @@ export default function GigApply(props) {
<div styleName="cta-buttons">
<Link to={`${config.URL.AUTH}/member?retUrl=${encodeURIComponent(retUrl)}`} styleName="primaryBtn">Login</Link>
</div>
<p styleName="regTxt">Not a member? Register <a href={`${config.URL.AUTH}/member/registration?retUrl=${encodeURIComponent(signupRetUrl)}&mode=signUp&utm_source=gig_listing`}>here</a>.</p>
<p styleName="regTxt">Not a member? Register <a href={`${config.URL.AUTH}/member/registration?retUrl=${encodeURIComponent(retUrl)}&mode=signUp&utm_source=gig_listing`}>here</a>.</p>
</div>
</div>
</div>
Expand Down
8 changes: 2 additions & 6 deletions src/shared/components/Gigs/LoginModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ const progressBarMid = 'https://images.ctfassets.net/b5f1djy59z3a/517ZRt9geweW3Q
const progressBarXS = 'https://images.ctfassets.net/b5f1djy59z3a/6QxH7uVKCngtzBaXDn3Od1/3e0222a1ce773cead3f3a45f291f43a6/progress-bar-mobile.svg';
const blobPurple = 'https://images.ctfassets.net/b5f1djy59z3a/1ZRCwp1uoShcES16lQmeu/ba084734120ffedebcb92b4e3fa2d667/blob-purple.svg';

function LoginModal({
retUrl, signupRetUrl, onCancel, utmSource,
}) {
function LoginModal({ retUrl, onCancel, utmSource }) {
return (
<Modal
theme={modalStyle}
Expand All @@ -58,7 +56,7 @@ function LoginModal({
<div className={modalStyle.ctaButtons}>
<PrimaryButton
onClick={() => {
window.location = `${config.URL.AUTH}/member/registration?retUrl=${encodeURIComponent(signupRetUrl)}&mode=signUp&utm_source=${utmSource}`;
window.location = `${config.URL.AUTH}/member/registration?retUrl=${encodeURIComponent(retUrl)}&mode=signUp&utm_source=${utmSource}`;
}}
theme={{
button: buttonThemes.tc['primary-green-md'],
Expand All @@ -76,12 +74,10 @@ function LoginModal({

LoginModal.defaultProps = {
utmSource: 'gig_listing',
signupRetUrl: `${config.PLATFORM_SITE_URL}/onboard`,
};

LoginModal.propTypes = {
retUrl: PT.string.isRequired,
signupRetUrl: PT.string,
onCancel: PT.func.isRequired,
utmSource: PT.string,
};
Expand Down
4 changes: 1 addition & 3 deletions src/shared/components/Gigs/ReferralModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ function ReferralModal({
onReferralDone,
}) {
const retUrl = window.location.href;
const signupRetUrl = `${config.PLATFORM_SITE_URL}/onboard`;

return (
<Modal
onCancel={onCloseButton}
Expand Down Expand Up @@ -112,7 +110,7 @@ function ReferralModal({
>
LOGIN
</PrimaryButton>
<Link to={`${config.URL.AUTH}/member/registration?retUrl=${encodeURIComponent(signupRetUrl)}&mode=signUp&utm_source=gig_listing`} className={buttonThemes.tc['primary-white-md']} openNewTab="true">REGISTER</Link>
<Link to={`${config.URL.AUTH}/member/registration?retUrl=${encodeURIComponent(retUrl)}&mode=signUp&utm_source=gig_listing`} className={buttonThemes.tc['primary-white-md']} openNewTab="true">REGISTER</Link>
</div>
<p className={modalStyle.regTxt}>Find out how the referral program works <a href={HELP_INFO_LINK} target="_blank" rel="noreferrer">here</a>.</p>
</div>
Expand Down
5 changes: 1 addition & 4 deletions src/shared/components/LoginModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const buttonThemes = {
function LoginModal({
onCancel,
retUrl,
signupRetUrl,
utmSource,
modalTitle,
modalText,
Expand All @@ -46,7 +45,7 @@ function LoginModal({
>
LOGIN
</PrimaryButton>
<Link to={`${config.URL.AUTH}/member/registration?retUrl=${encodeURIComponent(signupRetUrl)}&mode=signUp${utmSource ? `&utm_source=${utmSource}` : ''}`} className={buttonThemes.tc['primary-white-md']}>REGISTER</Link>
<Link to={`${config.URL.AUTH}/member/registration?retUrl=${encodeURIComponent(retUrl)}&mode=signUp${utmSource ? `&utm_source=${utmSource}` : ''}`} className={buttonThemes.tc['primary-white-md']}>REGISTER</Link>
</div>
{infoNode}
</div>
Expand All @@ -57,13 +56,11 @@ function LoginModal({
LoginModal.defaultProps = {
utmSource: null,
infoNode: null,
signupRetUrl: `${config.PLATFORM_SITE_URL}/onboard`,
};

LoginModal.propTypes = {
onCancel: PT.func.isRequired,
retUrl: PT.string.isRequired,
signupRetUrl: PT.string,
utmSource: PT.string,
modalTitle: PT.string.isRequired,
modalText: PT.string.isRequired,
Expand Down