Skip to content

Commit

Permalink
fix: origin not changed for referral (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoycoechea-lightit authored Jul 24, 2024
1 parent 56c0445 commit 2d73376
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/eo_web/src/screens/AccountCreation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export const AccountCreation = () => {
setState,
setExperience,
flow,
setFlow,
setReferredBy,
} = useProfilingStore((state) => state);

Expand Down Expand Up @@ -138,7 +139,7 @@ export const AccountCreation = () => {
last_name: data.lastName,
email: data.email,
phone_number: data.phoneNumber.replace(/\D/g, ""),
origin: referredFlow ? getIndex(referredFlow) : getIndex(flow),
origin: getIndex(flow),
referred_by: referredBy ?? "",
});
switch (channel) {
Expand Down Expand Up @@ -210,6 +211,7 @@ export const AccountCreation = () => {
setIntroQuestionSubmissionId(submissionId);
setExperience(experience);
setReferredBy(referredBy);
if (referredFlow) setFlow(referredFlow);
}
});

Expand Down

0 comments on commit 2d73376

Please sign in to comment.