mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Added error handling for checkout/signup failure
closes https://github.com/TryGhost/members.js/issues/38 - Added error state to signup action button in case of action failure like checkout session rejection - Checkout session rejection was previously incorrectly timing out and returning 200
This commit is contained in:
parent
e538f9b363
commit
66479c1990
1 changed files with 7 additions and 1 deletions
|
@ -35,10 +35,16 @@ class SignupPage extends React.Component {
|
|||
renderSubmitButton() {
|
||||
const {action, brandColor} = this.context;
|
||||
|
||||
const label = (action === 'signup:running') ? 'Sending...' : 'Continue';
|
||||
let label = (action === 'signup:running') ? 'Sending...' : 'Continue';
|
||||
let retry = false;
|
||||
if (action === 'signup:failed') {
|
||||
label = 'Retry';
|
||||
retry = true;
|
||||
}
|
||||
const disabled = (action === 'signup:running') ? true : false;
|
||||
return (
|
||||
<ActionButton
|
||||
retry={retry}
|
||||
onClick={e => this.handleSignup(e)}
|
||||
disabled={disabled}
|
||||
brandColor={brandColor}
|
||||
|
|
Loading…
Add table
Reference in a new issue