-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
92 lines (78 loc) · 2.71 KB
/
App.js
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import { StatusBar } from "expo-status-bar";
import { StyleSheet, Text, View,Image, KeyboardAvoidingView } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { Ionicons,MaterialCommunityIcons,Feather} from '@expo/vector-icons';
import { HomePages,WidgetPages,SettingPages} from "./components/NestedNavigation";
import Icon from "./assets/icons/mikroAPP.png";
import CostumHeader from "./components/header";
import { useFonts } from "expo-font";
import React from 'react';
import { useEffect } from 'react';
import { Surface } from "react-native-paper";
import * as SplashScreen from 'expo-splash-screen'
const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();
export default function App() {
const [fontsLoaded] = useFonts({
'Jakarta': require('./assets/fonts/jakarta.ttf'),
'Inter': require('./assets/fonts/inter.ttf'),
'Rubik': require('./assets/fonts/rubik.ttf'),
'InterSemi': require('./assets/fonts/interFamily/InterSemiBold.ttf'),
});
useEffect(()=>{
async function prepare() {
await SplashScreen.preventAutoHideAsync();
}
prepare();
},[]);
if (!fontsLoaded) {
return undefined;
} else {
SplashScreen.hideAsync();
}
return (
<NavigationContainer>
<StatusBar backgroundColor="white" />
<Tab.Navigator initialRouteName="Home"
screenOptions={{
tabBarHideOnKeyboard:true
}}
>
<Tab.Screen name="Settings" component={SettingPages}
options={{
tabBarIcon: ({ focused, color, size }) => (
<Ionicons name={focused ? 'ios-settings-sharp' : 'ios-settings-outline'} size={24} color={focused ? '#239ffb' : '#8C8C8E'} />
),
header:() => (
<CostumHeader/>
),
}}
/>
<Tab.Screen
name="Home"
component={HomePages}
options={{
tabBarIcon: ({ focused, color, size }) => (
<Ionicons name={focused ? 'md-home-sharp' : 'md-home-outline'} size={24} color={focused ? '#239ffb' : '#8C8C8E'} />
),
header: () => (
<CostumHeader/>
)
}}
/>
<Tab.Screen name="Widget" component={WidgetPages}
options={{
tabBarIcon: ({ focused, color, size }) => (
<MaterialCommunityIcons name={focused ? 'widgets' : 'widgets-outline'} size={24} color={focused ? '#239ffb' : '#8C8C8E'} />
),
header: () => (
<CostumHeader/>
)
}}
/>
</Tab.Navigator>
</NavigationContainer>
);
}