From 0844cbd14a311ace360e5990ca15a53f23f250af Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Fri, 2 Sep 2016 03:08:46 -0400 Subject: [PATCH] Don't show claim code page after user submits or skips --- js/main.js | 5 ++--- js/page/claim_code.js | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/main.js b/js/main.js index b6782635b..5c14b68da 100644 --- a/js/main.js +++ b/js/main.js @@ -4,9 +4,8 @@ var init = function() { ReactDOM.render( { if (balance <= 0) { window.location.href = '?claim'; diff --git a/js/page/claim_code.js b/js/page/claim_code.js index cd170e41c..02fb49d09 100644 --- a/js/page/claim_code.js +++ b/js/page/claim_code.js @@ -39,8 +39,8 @@ var ClaimCodePage = React.createClass({ if (response.success) { alert('Your invite code has been redeemed! The credits will be added to your balance shortly.'); - // Send them to "landing" instead of "home" (home will just trigger the message all over again until the credits arrive) - window.location = '?landing'; + localStorage.setItem('claimCodeDone', true); + window.location = '?home'; } else { alert(response.reason); this.setState({ @@ -66,7 +66,8 @@ var ClaimCodePage = React.createClass({ }, handleSkip: function() { alert('Welcome to LBRY! You can visit the Wallet page to redeem an invite code at any time.'); - window.location = '?landing'; + localStorage.setItem('claimCodeDone', true); + window.location = '?home'; }, render: function() { return (