import React, { useEffect, useState } from 'react'; import { View, Text, StyleSheet, TouchableOpacity, Linking, Alert, Button } from 'react-native'; import { useAuthenticator } from '@aws-amplify/ui-react-native'; import useFetchUserAttributes from '../hooks/useFetchUserAttributes'; import { fetchAuthSession, getCurrentUser, signInWithRedirect, signOut } from 'aws-amplify/auth'; import { deleteAllEmails, deleteAllScannedHistories, getUserInfo } from '../api/qrCodeAPI'; // Import the API function import { Buffer } from 'buffer'; import { Ionicons } from '@expo/vector-icons'; function SignOutButton() { const { signOut } = useAuthenticator(); return