diff --git a/android/app/release/output-metadata.json b/android/app/release/output-metadata.json new file mode 100644 index 0000000..cd3757f --- /dev/null +++ b/android/app/release/output-metadata.json @@ -0,0 +1,20 @@ +{ + "version": 3, + "artifactType": { + "type": "APK", + "kind": "Directory" + }, + "applicationId": "com.safeqr.safeqr", + "variantName": "release", + "elements": [ + { + "type": "SINGLE", + "filters": [], + "attributes": [], + "versionCode": 1, + "versionName": "1.0.0", + "outputFile": "app-release.apk" + } + ], + "elementType": "File" +} \ No newline at end of file diff --git a/android/keystore b/android/keystore new file mode 100644 index 0000000..2f1222d Binary files /dev/null and b/android/keystore differ diff --git a/screens/SettingsScreen.tsx b/screens/SettingsScreen.tsx index 69ba4a3..f1d0013 100644 --- a/screens/SettingsScreen.tsx +++ b/screens/SettingsScreen.tsx @@ -16,7 +16,7 @@ const handleSignInWithRedirect = async () => { try { await signInWithRedirect(); } catch (error) { - console.error('Error during sign in:', error); + console.log('Error during sign in:', error); } }; @@ -24,14 +24,18 @@ const SettingsScreen: React.FC = () => { const { userAttributes } = useFetchUserAttributes(); const [googleAccessToken, setGoogleAccessToken] = useState(null); const [userEmail, setUserEmail] = useState(null); + const [userSource, setUserSource] = useState(null); const fetchUserEmail = async () => { try { console.log('fetchUserEmail triggered'); const userInfo = await getUserInfo(); + console.log("User Source: ", userInfo.source); + + setUserSource(userInfo.source) setUserEmail(userInfo.email); // Assuming userInfo has an email property } catch (error) { - console.error('Error fetching user email:', error); + console.log('Error fetching user email:', error); } }; @@ -64,8 +68,8 @@ const SettingsScreen: React.FC = () => { try { parsedPayload = JSON.parse(decodedPayload); } catch (parseError) { - console.error('Error parsing payload:', parseError); - console.error(`Parse error: ${parseError.message}\nPayload: ${decodedPayload}`); + console.log('Error parsing payload:', parseError); + console.log(`Parse error: ${parseError.message}\nPayload: ${decodedPayload}`); return; } @@ -92,13 +96,13 @@ const SettingsScreen: React.FC = () => { console.log("date created: ", new Date(1721715837500).toLocaleString('en-US', options)); } else { - console.error('No Google access token found in the payload'); + console.log('No Google access token found in the payload'); } } else { - console.error('No ID token found in the session'); + console.log('No ID token found in the session'); } } catch (error) { - console.error('Error getting Google access token:', error); + console.log('Error getting Google access token:', error); } }; @@ -176,19 +180,23 @@ const SettingsScreen: React.FC = () => { - {/* Email Section */} - - - Email: - {userEmail || 'Loading...'} - - - - Delete All Email - - - - + {/* Email Section - Only show when userSource is "Google" */} + {userSource === "Google" && ( + <> + + + Email: + {userEmail || 'Loading...'} + + + + Delete All Email + + + + + )} + {/* History & Bookmarks Section */}