-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
44 lines (38 loc) · 1.16 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
43
44
import { NavigationContainer } from "@react-navigation/native";
import { createTheme, ThemeProvider } from "@rneui/themed";
import type { FC } from "react";
import { memo } from "react";
import { Provider as PaperProvider } from "react-native-paper";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { enableScreens } from "react-native-screens";
import { Provider } from "react-redux";
import Main from "./src/components/Main";
import apiSlice from "./src/redux/apiSlice";
import { store } from "./src/redux/store";
enableScreens(true);
store.dispatch(apiSlice.endpoints.getMain.initiate());
const myTheme = createTheme({
lightColors: {
background: "rgb(255, 255, 255)",
grey0: "rgba(28, 28, 30, 0.5)",
},
darkColors: {
background: "rgb(21, 32, 43)",
black: "white",
},
mode: "light",
});
const App: FC = () => (
<SafeAreaProvider>
<Provider store={store}>
<PaperProvider>
<ThemeProvider theme={myTheme}>
<NavigationContainer>
<Main />
</NavigationContainer>
</ThemeProvider>
</PaperProvider>
</Provider>
</SafeAreaProvider>
);
export default memo(App);