-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
41 lines (39 loc) · 1.22 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import {TamaguiProvider} from "tamagui";
import {config} from "./tamagui.config";
import {useColorScheme} from "react-native";
import {StatusBar} from "expo-status-bar";
import {AuthProvider} from "./src/contexts/";
import {useCachedResources} from "./src/hooks";
import {Amplify} from "aws-amplify";
import {RootNavigation} from "./src/navigation/stacks";
import {BottomSheetModalProvider} from "@gorhom/bottom-sheet";
import {GestureHandlerRootView} from "react-native-gesture-handler";
Amplify.configure({
Auth: {
Cognito: {
// @ts-ignore
userPoolId: `${process.env.EXPO_PUBLIC_USER_POOL_ID}`,
// @ts-ignore
userPoolClientId: `${process.env.EXPO_PUBLIC_USER_POOL_CLIENT_ID}`,
},
}
})
export default function App() {
const scheme = useColorScheme();
const isLoadingComplete = useCachedResources();
if (!isLoadingComplete) {
return <></>;
}
return (
<GestureHandlerRootView style={{flex:1}}>
<AuthProvider>
<TamaguiProvider config={config} defaultTheme={scheme!}>
<BottomSheetModalProvider>
<RootNavigation scheme={scheme} />
<StatusBar style="auto"/>
</BottomSheetModalProvider>
</TamaguiProvider>
</AuthProvider>
</GestureHandlerRootView>
);
}