-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
42 lines (35 loc) · 1.2 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
42
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* Generated with the TypeScript template
* https://github.com/react-native-community/react-native-template-typescript
*
* @format
*/
import 'react-native-gesture-handler';
import React from 'react';
import { View, StatusBar, useColorScheme } from 'react-native';
import {StripeProvider} from '@stripe/stripe-react-native';
import { Colors } from 'react-native/Libraries/NewAppScreen';
import Router from './src/router';
import Amplify from 'aws-amplify';
import {withAuthenticator} from 'aws-amplify-react-native';
import config from './src/aws-exports';
Amplify.configure(config)
const App = () => {
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
flex: 1,
};
return (
<View style={backgroundStyle}>
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<StripeProvider publishableKey="pk_test_51IxBmfKtZXNPksXoQzr9OWgzNkpqi7lVYu3otSoXlcyMzDExlr9AkP2Bs3EaXXVCvV10PDhaGLKxCeeh2xlqP4mB00TbmLjx0m">
<Router />
</StripeProvider>
</View>
);
};
export default withAuthenticator(App);