-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp-finished.tsx
46 lines (41 loc) · 1.07 KB
/
App-finished.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
43
44
45
46
import React from "react";
import { StyleSheet, SafeAreaView } from "react-native";
import { SignOutButton } from "./components/SignOutButton";
import { useColorScheme } from "react-native";
import { Authenticator } from "@aws-amplify/ui-react-native";
import {
defaultDarkModeOverride,
ThemeProvider,
} from "@aws-amplify/ui-react-native";
import SessionList from "./Sessions";
import outputs from "./amplify_outputs.json";
import { Amplify } from "aws-amplify";
Amplify.configure(outputs);
const App = () => {
const colorMode = useColorScheme();
console.log(colorMode);
return (
<ThemeProvider
theme={{
overrides: [defaultDarkModeOverride],
}}
colorMode={"dark"}
>
<Authenticator.Provider>
<Authenticator>
<SafeAreaView style={styles.container}>
<SignOutButton />
<SessionList />
</SafeAreaView>
</Authenticator>
</Authenticator.Provider>
</ThemeProvider>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
padding: 8,
},
});
export default App;