Skip to content

Commit

Permalink
fix(SFOX): properly show/remove loader on signup
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Welber committed May 31, 2018
1 parent 79a5ceb commit 34cd44d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default ({ coreSagas }) => {

const sfoxSignup = function * () {
try {
yield put(A.sfoxLoading())
yield call(coreSagas.data.sfox.signup)
const profile = yield select(selectors.core.data.sfox.getProfile)
if (!profile.error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class AcceptTerms extends Component {
const busy = this.props.errorStatus.cata({
Success: () => false,
Failure: (err) => err,
Loading: () => true,
Loading: () => Remote.Loading,
NotAsked: () => false
})

Expand Down Expand Up @@ -168,9 +168,9 @@ class AcceptTerms extends Component {
<ButtonWrapper>
<Button uppercase type='submit' nature='primary' fullwidth disabled={invalid || busy || !smsNumber || !email}>
{
!busy
? <span>Continue</span>
: <HeartbeatLoader height='20px' width='20px' color='white' />
Remote.Loading.is(busy)
? <HeartbeatLoader height='20px' width='20px' color='white' />
: <span>Continue</span>
}
</Button>
</ButtonWrapper>
Expand Down

0 comments on commit 34cd44d

Please sign in to comment.