diff --git a/MobileApp/src/components/FaceBookLogin/FaceBookLogin.js b/MobileApp/src/components/FaceBookLogin/FaceBookLogin.js index 1f29a2903..b4753cda0 100644 --- a/MobileApp/src/components/FaceBookLogin/FaceBookLogin.js +++ b/MobileApp/src/components/FaceBookLogin/FaceBookLogin.js @@ -11,8 +11,6 @@ export async function facebookLogin(navigate) { return } - console.log(`Login success with permissions: ${result.grantedPermissions.toString()}`); - // get the access token const data = await AccessToken.getCurrentAccessToken(); @@ -25,7 +23,6 @@ export async function facebookLogin(navigate) { // login with credential await firebase.auth().signInWithCredential(credential).then((user)=>{ - console.log(JSON.stringify(user.user.toJSON().uid)) const uid = user.user.toJSON().uid const name = user.user.toJSON().displayName const email = user.user.toJSON().email diff --git a/MobileApp/src/components/UserDataHandling/UserDataHandling.js b/MobileApp/src/components/UserDataHandling/UserDataHandling.js index 2f61b54ca..fd868267a 100644 --- a/MobileApp/src/components/UserDataHandling/UserDataHandling.js +++ b/MobileApp/src/components/UserDataHandling/UserDataHandling.js @@ -11,9 +11,9 @@ export function generateResult(data) { if (data.sex === 0) { result.push(['gender-male-female', 'Male']); - } else if (data.sex === 0) { + } else if (data.sex === 1) { result.push(['gender-male-female', 'Female']); - } else if (data.sex === 0) { + } else if (data.sex === 2) { result.push(['gender-male-female', 'Both male and female']); } else { result.push(['gender-male-female', "Don't know the gender"]); @@ -40,7 +40,7 @@ export function generateUUID() { let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function( c, ) { - let r = (dt + Math.random() * 16) % 16 | 0; + let r = (dt + window.Crypto.getRandomValues(new Uint32Array(1)) * 16) % 16 | 0; dt = Math.floor(dt / 16); return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16); }); diff --git a/MobileApp/src/screens/FormScreen/FormScreen.js b/MobileApp/src/screens/FormScreen/FormScreen.js index b81cd646f..58330c908 100644 --- a/MobileApp/src/screens/FormScreen/FormScreen.js +++ b/MobileApp/src/screens/FormScreen/FormScreen.js @@ -115,8 +115,6 @@ class FormScreen extends React.Component { isAlive: this.state.isAlive, location: this.state.location, time: this.state.time, - isAlive: this.state.isAlive, - address: this.state.address, verified: this.state.verified, notes: this.state.notes, park: this.state.park, diff --git a/MobileApp/src/screens/ProfileScreen/ProfileScreen.js b/MobileApp/src/screens/ProfileScreen/ProfileScreen.js index eafbd21a1..b4590525a 100644 --- a/MobileApp/src/screens/ProfileScreen/ProfileScreen.js +++ b/MobileApp/src/screens/ProfileScreen/ProfileScreen.js @@ -87,7 +87,6 @@ class ProfileScreen extends React.Component { logutHandler = async () => { await this.closeMenu(); - let result = await auth() .signOut() .then(() => console.log('Log out')); };