-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
147 lines (140 loc) · 4.2 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import { StatusBar } from 'expo-status-bar';
import { Keyboard, KeyboardAvoidingView, Platform, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import Task from './Components/task';
import { NavigationContainer,DefaultTheme, DarkTheme, } from '@react-navigation/native';
import {Provider as PaperProvider,DarkTheme as PaperDarkTheme} from 'react-native-paper';
import { createStackNavigator } from '@react-navigation/stack';
import { Home, Portfolio, Profile, Settings, EditProfile } from './screens';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import React, { useState } from 'react';
import { AntDesign, Ionicons, Entypo } from '@expo/vector-icons';
import { enableScreens } from 'react-native-screens';
import { ThemeProvider, useTheme } from './Components/ThemeProvider'
import {useColorScheme} from 'react-native';
import { darkColors,lightTheme } from './Components/theme';
import { I18nextProvider, useTranslation } from 'react-i18next';
import i18n from './assets/i18n/i18n.config.js';
enableScreens();
const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();
const screenOptions = {
tabBarShowLabel: false,
headerShown: false,
tabBarStyle: {
position: 'absolute',
bottom: 0,
right: 0,
left: 0,
height: 90,
backgroundColor: '#fff',
},
};
const Tabs = () => {
return (
<Tab.Navigator screenOptions={screenOptions}>
<Tab.Screen
name="Kryesore"
component={Home}
options={{
tabBarIcon: ({ focused }) => (
<View style={{ alignItems: 'center', justifyContent: 'center' }}>
<AntDesign name="home" size={24} color={focused ? "#71E3DD" : "#111"} />
</View>
),
}}
/>
<Tab.Screen
name="Portofoli"
component={Portfolio}
options={{
tabBarIcon: ({ focused }) => (
<View style={{ alignItems: 'center', justifyContent: 'center' }}>
<Entypo name="bookmarks" size={24} color={focused ? "#71E3DD" : "#111"} />
</View>
),
}}
/>
<Tab.Screen
name="Ndrysho"
component={Settings}
options={{
tabBarIcon: ({ focused }) => (
<View style={{ alignItems: 'center', justifyContent: 'center' }}>
<Ionicons name="settings-outline" size={24} color={focused ? "#71E3DD" : "#111"} />
</View>
),
}}
/>
<Tab.Screen
name="Profili"
component={Profile}
options={{
tabBarIcon: ({ focused }) => (
<View style={{ alignItems: 'center', justifyContent: 'center' }}>
<Ionicons name="person-circle-outline" size={24} color={focused ? "#71E3DD" : "#111"} />
</View>
),
}}
/>
</Tab.Navigator>
);
};
export default function App() {
const scheme = useColorScheme();
const MyTheme = scheme === 'dark' ? DarkTheme : DefaultTheme;
const {t}=useTranslation();
return (
<ThemeProvider theme={scheme === 'dark' ? darkColors : lightTheme}>
<NavigationContainer theme={MyTheme}>
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name="Tabs" component={Tabs} />
<Stack.Screen name="EditProfile" component={EditProfile} />
</Stack.Navigator>
</NavigationContainer></ThemeProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F1FCFB',
},
tasksWrapper: {
paddingTop: 100,
paddingHorizontal: 20,
},
sectionTitle: {
fontSize: 24,
fontWeight: 'bold',
},
items: {
marginTop: 30,
},
writeTaskWrapper: {
position: 'absolute',
bottom: 60,
width: '100%',
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
},
input: {
paddingVertical: 15,
paddingHorizontal: 15,
backgroundColor: '#FFFFFF',
borderRadius: 60,
borderColor: '#71E3DD',
borderWidth: 1,
width: 250,
},
addWrapper: {
width: 60,
height: 60,
backgroundColor: '#FFFFFF',
borderRadius: 60,
justifyContent: 'center',
alignItems: 'center',
borderColor: '#71E3DD',
borderWidth: 1,
},
addText: {},
});