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) {
1414 type : SET_PRESET ,
1515 payload : res . data . presets ,
1616 } ) ;
17- return Promise . resolve ( ) ;
1817 } catch ( { response } ) {
1918 console . log ( response . data . error ) ;
2019 }
Original file line number Diff line number Diff line change @@ -44,16 +44,15 @@ class App extends Component {
4444 window . addEventListener ( 'message' , this . onReceiveMessage ) ;
4545 }
4646
47- componentWillReceiveProps ( ) {
47+ async componentWillReceiveProps ( ) {
4848 const token = localStorage . getItem ( 'token' ) ;
4949 // Sign in upon receiving user token
5050 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 ,
5756 } ) ;
5857 }
5958 }
You can’t perform that action at this time.
0 commit comments