From 688e3e6f9a6862e7f421cf66332a6713496378fb Mon Sep 17 00:00:00 2001 From: heyethereum Date: Mon, 8 Jul 2024 23:09:17 +0800 Subject: [PATCH] created useFetchUserAttributes custom hooks --- App.tsx | 8 +----- hooks/useFetchUserAttributes.ts | 37 ++++++++++++++++++++++++++ screens/SettingsScreen.tsx | 46 +++++++++++++++++++++++++++++---- 3 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 hooks/useFetchUserAttributes.ts diff --git a/App.tsx b/App.tsx index ef7129a..0093817 100644 --- a/App.tsx +++ b/App.tsx @@ -7,8 +7,7 @@ import SettingsScreen from './screens/SettingsScreen'; import { QRCodeContext } from './types'; import CustomTabBar from './components/CustomTabBar'; -import { Button } from 'react-native'; -import { Authenticator, useAuthenticator, withAuthenticator } from '@aws-amplify/ui-react-native'; +import { withAuthenticator } from '@aws-amplify/ui-react-native'; import { Amplify } from 'aws-amplify'; import config from './src/aws-exports'; import { enableScreens } from 'react-native-screens'; @@ -17,11 +16,6 @@ enableScreens(); Amplify.configure(config); -function SignOutButton() { - const { signOut } = useAuthenticator(); - return