-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
115 lines (109 loc) · 2.88 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
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
import React, { useEffect } from 'react'
import { Provider } from 'react-redux'
import { NavigationContainer } from '@react-navigation/native'
import { createNativeStackNavigator, } from '@react-navigation/native-stack'
import { configureStore } from '@reduxjs/toolkit'
import 'react-native-gesture-handler'
import './global'
import * as Font from "expo-font"
import Slice from './reducer'
import Watchlist from './pages/pages/watchlist/Index'
import Orders from './pages/pages/orders/Index'
import Account from './pages/pages/account/Index'
import Position from './pages/pages/Positions/Index'
import Suggestions from './pages/pages/Suggestions/Index'
import Layout from './Layout'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import Icon from './components/Icon'
import { colors, gfont, h, w } from './components/style'
const store = configureStore({ reducer: Slice.reducer });
const Stack = createNativeStackNavigator();
const Tab = createBottomTabNavigator();
interface AppStatus {
isImportFont: boolean
}
const AppContainer = () => {
const [status, setStatus] = React.useState<AppStatus>({
isImportFont: false
})
const Context = React.createContext({});
return (
<NavigationContainer>
<Tab.Navigator
screenOptions={{
tabBarStyle: {
backgroundColor: colors.bg2,
height: h(9),
paddingTop: h(1),
paddingBottom: h(1),
}
}}
>
<Tab.Screen
name="Watchlist"
component={Watchlist}
options={{
tabBarLabel: 'Home',
tabBarIcon: ({ color, size }) => (
<Icon.Watchlist color={color} width={w(5)} height={w(5)} />
),
headerShadowVisible: false,
tabBarLabelStyle: {
...gfont.t
},
tabBarInactiveTintColor: colors.color2
}}
/>
<Tab.Screen
name="Positions"
component={Position}
options={{
tabBarLabel: 'Positions',
tabBarIcon: ({ color, size }) => (
<Icon.Position color={color} width={w(6)} height={w(6)} />
),
headerShadowVisible: false,
tabBarLabelStyle: {
...gfont.t
}
}}
/>
<Tab.Screen
name="Suggestions"
component={Suggestions}
options={{
tabBarLabel: 'Suggestions',
tabBarIcon: ({ color, size }) => (
<Icon.Suggestion color={color} width={w(7)} height={w(7)} />
),
headerShadowVisible: false,
tabBarLabelStyle: {
...gfont.t
}
}}
/>
<Tab.Screen
name="Account"
component={Account}
options={{
tabBarLabel: 'Account',
tabBarIcon: ({ color, size }) => (
<Icon.Account color={color} width={w(5.5)} height={w(5.5)} />
),
headerShadowVisible: false,
tabBarLabelStyle: {
...gfont.t
}
}}
/>
</Tab.Navigator>
</NavigationContainer>
)
}
export default function App() {
return (
<Provider store={store}>
<AppContainer />
</Provider>
)
}