-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
67 lines (60 loc) · 2.12 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import React, { useState } from "react";
import { StatusBar, StyleSheet, SafeAreaView } from "react-native";
import { PaperProvider, ThemeProvider } from "react-native-paper";
import { MyGlobalContext } from "./context/MyGlobalContext";
import { useFonts } from "expo-font";
// 👇 theme
import { theme } from "./theme";
// 👇 models
import { HomeDoctorItem } from "./components/Home/Home Doctors/homeDoctors.model";
import { iSelectedChatItem } from "./components/Chats/AllChats/allChats.model";
// 👇 navigators
import MainNavigator from "./navigation/MainNavigator/MainNavigator";
export default function App() {
const [Ubuntu_FontLoaded] = useFonts({
ubuntu: require("./assets/fonts/Ubuntu/Ubuntu-Regular.ttf"),
ubuntuItalic: require("./assets/fonts/Ubuntu/Ubuntu-Italic.ttf"),
ubuntuLight: require("./assets/fonts/Ubuntu/Ubuntu-Light.ttf"),
ubuntuLightItalic: require("./assets/fonts/Ubuntu/Ubuntu-LightItalic.ttf"),
ubuntuMedium: require("./assets/fonts/Ubuntu/Ubuntu-Medium.ttf"),
ubuntuMediumItalic: require("./assets/fonts/Ubuntu/Ubuntu-MediumItalic.ttf"),
ubuntuBold: require("./assets/fonts/Ubuntu/Ubuntu-Bold.ttf"),
ubuntuBoldItalic: require("./assets/fonts/Ubuntu/Ubuntu-BoldItalic.ttf"),
});
const [selectedDoctor, setSelectedDoctor] = useState<HomeDoctorItem | null>(
null
);
const [selectedChat, setSelectedChat] = useState<iSelectedChatItem | null>(
null
);
return (
<PaperProvider theme={theme}>
<ThemeProvider theme={theme}>
<MyGlobalContext.Provider
value={{
Ubuntu_FontLoaded,
selectedDoctor,
setSelectedDoctor,
selectedChat,
setSelectedChat,
}}
>
<SafeAreaView style={styles.container}>
<StatusBar
barStyle={"dark-content"}
backgroundColor={"#fff"}
hidden
/>
<MainNavigator />
</SafeAreaView>
</MyGlobalContext.Provider>
</ThemeProvider>
</PaperProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
},
});