Skip to content

Commit

Permalink
Merge pull request #46 from spknetwork/feat/confirm-referral
Browse files Browse the repository at this point in the history
confirm referral
  • Loading branch information
Adesojisouljay authored Jul 25, 2024
2 parents ca3e754 + 1e8fe69 commit 8ee0124
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/common/pages/sign-up.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,19 @@ const SignUpPage = (props: Props | any) => {
setEmail(email.toLowerCase());
};

const referralChanged = (e: { target: { value: any } }) => {
const referralChanged = async (e: { target: { value: any } }) => {
setInProgress(true);
const { value: referall } = e.target;
setReferral(referall.toLowerCase());
console.log(referral)

const referralIsValid = await getAccount(referall);

if (!referralIsValid) {
setError("Referral is not a valid hive username");
} else {
setError("");
}
setInProgress(false);
};

const getCurrentCommunity = () => {
Expand Down

0 comments on commit 8ee0124

Please sign in to comment.