diff --git a/src/screens/login/Login.js b/src/screens/login/Login.js index e9521e0..793a380 100644 --- a/src/screens/login/Login.js +++ b/src/screens/login/Login.js @@ -42,25 +42,25 @@ class LoginScreen extends Component { if (regex.test(this.state.username) === true) { console.log('true') - // const fcm = messaging() - // if (!await fcm.hasPermission()) { - // try { - // await messaging().requestPermission() - // } catch (error) { - // this.setState({ - // isLoading: false - // }) - // } - // } + const fcm = messaging() + if (!await fcm.hasPermission()) { + try { + await messaging().requestPermission() + } catch (error) { + this.setState({ + isLoading: false + }) + } + } - // const fcmToken = await messaging().getAPNSToken() + const fcmToken = await messaging().getAPNSToken() let params = { // mobile: this.state.username, username: this.state.username, password: this.state.password, - // fcm_token: fcmToken + fcm_token: fcmToken } console.log('params >> ', params)