-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
164 lines (145 loc) · 5.2 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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
import React from 'react';
import {Provider} from 'react-redux';
import {View, Text,ActivityIndicator} from 'react-native';
import reduxStorage from './src/store/store';
import {BrowserViewControllerConnected} from './src/browser/BrowserViewController';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {Blog} from './src/browser/Blog';
import {About} from './src/browser/About';
import {Games} from './src/browser/Games';
import {Experiments} from './src/browser/Experiments';
import {Music} from './src/browser/Music';
import { PersistGate } from 'redux-persist/integration/react'
import root from './src/store/navigationsatateBysaga';
// import store from './src/store/store';
// import Blog from '../screens/Blog.tsx';
// import Experiments from '../screens/Experiments.tsx';
// import Games from '../screens/Games.tsx';
// import Music from '../screens/Music.tsx';
// import Constants from 'expo-constants';
// console.log("=====>expo unimodule",Constants.systemFonts);
interface Props {}
const {store,persistor} = reduxStorage();
// store.runSaga(root)
interface State {}
class AppContainer extends React.Component<Props, State> {
constructor(props:any){
super(props);
}
loaderComponet(){
return (
<View style={{justifyContent:"center",alignItems:"center",flex:1,backgroundColor:"#ffff"}}>
<ActivityIndicator color="Blue" size="large" />
</View>
)
}
render() {
// return ( <View style={{flex:1}}><Text>Hello</Text></View>)
const {} = this.props;
const Stack = createNativeStackNavigator();
const NavigationContainer1 = () => {
return (
<Stack.Navigator
initialRouteName="Home"
screenOptions={{
headerShown: false,
}}>
{/* <Stack.Screen name="Home" component={Home} /> */}
{/* <Stack.Screen name="Home">
{props => (
<Home
{...props}
webView={barAwareWebView({
headerConfig: config.header,
scrollY: this.scrollY,
scrollEndDragVelocity: this.scrollEndDragVelocity,
navigation: props.navigation,
})}
/>
)}
</Stack.Screen> */}
<Stack.Screen
name="Home"
component={BrowserViewControllerConnected}
/>
<Stack.Screen name="About" component={About} />
<Stack.Screen name="Music" component={Music} />
<Stack.Screen name="Experiments" component={Experiments} />
<Stack.Screen name="Games" component={Games} />
<Stack.Screen name="Blog" component={Blog} />
{/* <Stack.Screen name="About">
{props => (
<About
{...props}
webView={barAwareWebView({
headerConfig: config.header,
scrollY: this.scrollY,
scrollEndDragVelocity: this.scrollEndDragVelocity,
navigation: props.navigation,
})}
/>
)}
</Stack.Screen> */}
{/* <Stack.Screen name="Blog">
{props => (
<Blog
{...props}
webView={barAwareWebView({
headerConfig: config.header,
scrollY: this.scrollY,
scrollEndDragVelocity: this.scrollEndDragVelocity,
navigation: props.navigation,
})}
/>
)}
</Stack.Screen>
<Stack.Screen name="Experiments">
{props => (
<Experiments
{...props}
webView={barAwareWebView({
headerConfig: config.header,
scrollY: this.scrollY,
scrollEndDragVelocity: this.scrollEndDragVelocity,
navigation: props.navigation,
})}
/>
)}
</Stack.Screen>
<Stack.Screen name="Games">
{props => <Games {...props} webView={mainWebView} />}
</Stack.Screen>
<Stack.Screen name="Music">
{props => (
<Music
{...props}
webView={barAwareWebView({
headerConfig: config.header,
scrollY: this.scrollY,
scrollEndDragVelocity: this.scrollEndDragVelocity,
navigation: props.navigation,
})}
/>
)}
</Stack.Screen> */}
{/* <Stack.Screen name="Details" component={DetailsScreen} /> */}
</Stack.Navigator>
);
};
return (
<SafeAreaProvider>
<Provider store={store}>
<PersistGate loading={this.loaderComponet()} persistor={persistor}>
<NavigationContainer>
{/* <BrowserViewControllerConnected /> */}
<NavigationContainer1 />
</NavigationContainer>
</PersistGate>
</Provider>
</SafeAreaProvider>
);
}
}
export default AppContainer;