-
Notifications
You must be signed in to change notification settings - Fork 4
/
App.tsx
40 lines (36 loc) · 1.23 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
import React from "react";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { DefaultTheme, Provider as PaperProvider } from "react-native-paper";
import { COLOR_ACCENT, COLOR_PRIMARY } from "./AppStyles";
import { initializeApp, getApps } from "firebase/app";
import { EntryStackScreen } from "./screens/EntryStackScreen";
// TODO: Make sure to create a file called "keys.json" in your project
// directory & add your Firebase configuration keys to that file.
// We add this file to our gitignore, since we don't want this to be
// published on Version Control.
const firebaseConfig = require("./keys.json");
if (getApps().length == 0) {
initializeApp(firebaseConfig);
}
// Theme Object for React Native Paper
const theme = {
...DefaultTheme,
roundness: 2,
colors: {
...DefaultTheme.colors,
primary: COLOR_PRIMARY,
accent: COLOR_ACCENT,
},
};
export default function App() {
// To use React Native Paper, we wrap our EntryStackScreen in
// PaperProvider.
// Learn More: https://callstack.github.io/react-native-paper/getting-started.html#usage
return (
<SafeAreaProvider>
<PaperProvider theme={theme}>
<EntryStackScreen />
</PaperProvider>
</SafeAreaProvider>
);
}