File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ export default function authSignUpNSignIn(presets) {
14
14
type : SET_PRESET ,
15
15
payload : res . data . presets ,
16
16
} ) ;
17
- return Promise . resolve ( ) ;
18
17
} catch ( { response } ) {
19
18
console . log ( response . data . error ) ;
20
19
}
Original file line number Diff line number Diff line change @@ -44,16 +44,15 @@ class App extends Component {
44
44
window . addEventListener ( 'message' , this . onReceiveMessage ) ;
45
45
}
46
46
47
- componentWillReceiveProps ( ) {
47
+ async componentWillReceiveProps ( ) {
48
48
const token = localStorage . getItem ( 'token' ) ;
49
49
// Sign in upon receiving user token
50
50
if ( ! this . state . signIn && token ) {
51
- this . props . authSignUpNSignIn ( this . props . presets ) . then ( ( ) => {
52
- // Set sign in flag after received the preset data
53
- this . setState ( {
54
- signIn : true ,
55
- showSignInDialog : false ,
56
- } ) ;
51
+ await this . props . authSignUpNSignIn ( this . props . presets ) ;
52
+ // Set sign in flag after received the preset data
53
+ this . setState ( {
54
+ signIn : true ,
55
+ showSignInDialog : false ,
57
56
} ) ;
58
57
}
59
58
}
You can’t perform that action at this time.
0 commit comments