reword credit claim messages
This commit is contained in:
parent
ef1cc62c26
commit
011199aef7
2 changed files with 17 additions and 3 deletions
|
@ -38,7 +38,16 @@ var ClaimCodePage = React.createClass({
|
|||
var response = JSON.parse(xhr.responseText);
|
||||
|
||||
if (response.success) {
|
||||
alert('Your invite code has been redeemed! The credits will be added to your balance shortly.');
|
||||
var redeemMessage = 'Your invite code has been redeemed. ';
|
||||
if (response.referralCredits > 0) {
|
||||
redeemMessage += 'You have also earned ' + response.referralCredits + ' credits from referrals. A total of ' +
|
||||
(response.activationCredits + response.referralCredits) + ' will be added to your balance shortly.';
|
||||
} else if(response.activationCredits > 0) {
|
||||
redeemMessage += response.activationCredits + ' credits will be added to your balance shortly.';
|
||||
} else {
|
||||
redeemMessage += 'The credits will be added to your balance shortly.';
|
||||
}
|
||||
alert(redeemMessage);
|
||||
localStorage.setItem('claimCodeDone', true);
|
||||
window.location = '?home';
|
||||
} else {
|
||||
|
|
|
@ -38,8 +38,13 @@ var ReferralPage = React.createClass({
|
|||
var response = JSON.parse(xhr.responseText);
|
||||
|
||||
if (response.success) {
|
||||
alert('You have earned ' + response.referralCredits + ' credits from referrals and ' +
|
||||
response.activationCredits + ' credits from activations.');
|
||||
if (response.referralCredits > 0) {
|
||||
alert('You have earned ' + response.referralCredits + ' credits from referrals. ' +
|
||||
'We will credit your account shortly. Thanks!');
|
||||
} else {
|
||||
alert('You have not earned any new referral credits since the last time you checked. ' +
|
||||
'Please check back in a week or two.');
|
||||
}
|
||||
|
||||
window.location = '?home';
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue