-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathStakingStack.tsx
64 lines (61 loc) · 1.9 KB
/
StakingStack.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
import React, {useContext} from 'react';
import {
createStackNavigator,
CardStyleInterpolators,
} from '@react-navigation/stack';
import NewStaking from './screens/NewStaking';
import StakingScreen from './screens/Staking';
import ValidatorList from './screens/ValidatorList';
import {getLanguageString} from './utils/lang';
import {useRecoilValue} from 'recoil';
import {languageAtom} from './atoms/language';
import {ThemeContext} from './ThemeContext';
const StakingStack = createStackNavigator();
const StakingStackScreen = () => {
const theme = useContext(ThemeContext);
const language = useRecoilValue(languageAtom);
return (
<StakingStack.Navigator
initialRouteName="StakingList"
screenOptions={{
// headerShown: false,
gestureEnabled: true,
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
headerStyle: {
shadowColor: 'transparent',
backgroundColor: theme.backgroundColor,
},
headerBackTitleVisible: false,
}}>
<StakingStack.Screen
name="StakingList"
component={StakingScreen}
options={{headerShown: false}}
/>
<StakingStack.Screen
name="ValidatorList"
component={ValidatorList}
options={{headerShown: false}}
// options={{
// title: getLanguageString(language, 'VALIDATOR_LIST_TITLE'),
// headerTitleStyle: {
// color: theme.textColor,
// },
// headerTintColor: theme.textColor,
// }}
/>
<StakingStack.Screen
name="NewStaking"
component={NewStaking}
options={{
title: getLanguageString(language, 'NEW_STAKING_TITLE'),
headerTitleStyle: {
color: theme.textColor,
},
headerTintColor: theme.textColor,
}}
/>
</StakingStack.Navigator>
);
};
export default StakingStackScreen;