-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
87 lines (72 loc) · 2.54 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
import React, { useEffect } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { PaperProvider } from 'react-native-paper'
import {useTheme} from 'react-native-paper';
//Navigation
import { NavigationContainer } from '@react-navigation/native';
import { createMaterialBottomTabNavigator } from "react-native-paper/react-navigation";
//Icons
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
//own components
import { Home } from './components/HomeComponent/ButtonComponents/Home';
//custom Theme
import cyberpunkTheme from './customTheme/customTheme';
import { useFonts } from 'expo-font';
import * as SplashScreen from 'expo-splash-screen';
export default function App() {
const Tab = createMaterialBottomTabNavigator();
const [fontsLoaded] = useFonts({
'orbitron-regular': require('./assets/fonts/Orbitron-Regular.ttf'),
});
useEffect(() => {
async function prepare() {
await SplashScreen.preventAutoHideAsync();
}
prepare();
},[])
if (!fontsLoaded) {
return null;
} else {
SplashScreen.hideAsync();
}
return (
<PaperProvider theme={cyberpunkTheme}>
<NavigationContainer>
<Tab.Navigator>
<Tab.Screen name="Home" component={Home} options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="home" color={color} size={26} />
),
}}/>
<Tab.Screen name="Profil" component={Home} options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="face-man-profile" color={color} size={26} />
),
}}/>
<Tab.Screen name="Exp" component={Home} options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="head-lightbulb" color={color} size={26} />
),
}}/>
<Tab.Screen name="Tech Stack" component={Home} options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="hammer-screwdriver" color={color} size={26} />
),
}}/>
<Tab.Screen name="More" component={Home} options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="eye-plus" color={color} size={26} />
),
}}/>
</Tab.Navigator>
</NavigationContainer>
</PaperProvider>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
});