-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature in app referral program #1594
Feature in app referral program #1594
Conversation
<ion-avatar> | ||
<img src="/assets/images/share-icons/share-fb.png" /> | ||
</ion-avatar> | ||
<ion-avatar> | ||
<img src="/assets/images/share-icons/share-line.png" /> | ||
</ion-avatar> | ||
<ion-avatar> | ||
<img src="/assets/images/share-icons/share-email.jpg" /> | ||
</ion-avatar> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these icons supposed to be view only? As a user it seems pretty tempting to press these icons to share but then user will find out they are not buttons.
<ion-avatar> | ||
<img src="/assets/images/share-icons/share-email.jpg" /> | ||
</ion-avatar> | ||
<div class="share-more">更多</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translation should be applied here.
} | ||
|
||
async refetchReferralCode() { | ||
// return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be removed.
async refetchReferralCode() { | ||
// return; | ||
const referralCode = await this.diaBackendAuthService.getReferralCode(); | ||
if (!referralCode) this.diaBackendAuthService.syncProfile$().toPromise(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!referralCode) this.diaBackendAuthService.syncProfile$().toPromise(); | |
if (!referralCode) await this.diaBackendAuthService.syncProfile$().toPromise(); |
The promise should be awaited
@@ -87,6 +92,21 @@ export class SignupPage { | |||
), | |||
errorPath: 'confirmPassword', | |||
}, | |||
referralCodeValidator: { | |||
expression: (control: FormGroup) => { | |||
const alphanumeric = /^[A-Z0-9]{6}$/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worrying that doing form validation for lowercase letters would have negative UX impact for users that aren't aware of the fact that the referral code is case-sensitive. It's possible for some users to not understand why the referral code is not working when they type the code in lowercase.
In my opinion converting user's input to uppercase automatically would be a more ideal way. Let me know what do you think.
|
||
// eslint-disable-next-line class-methods-use-this | ||
async shareReferralCode(referralCode: string) { | ||
// TODO: use official (en, zh) text provided by @Tammy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO part
<div class="title">Share invitation code</div> | ||
<div class="subtitle">Share to get rewarded</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translation should be applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
No description provided.