2020-10-18 20:47:15 -04:00
|
|
|
import React, {Fragment, useEffect} from 'react';
|
2020-08-09 16:37:46 -04:00
|
|
|
import {
|
|
|
|
SafeAreaView,
|
|
|
|
StyleSheet,
|
|
|
|
ScrollView,
|
|
|
|
View,
|
|
|
|
Text,
|
|
|
|
StatusBar,
|
|
|
|
} from 'react-native';
|
|
|
|
|
|
|
|
import {
|
|
|
|
Header,
|
|
|
|
LearnMoreLinks,
|
|
|
|
Colors,
|
|
|
|
DebugInstructions,
|
|
|
|
ReloadInstructions,
|
|
|
|
} from 'react-native/Libraries/NewAppScreen';
|
|
|
|
|
|
|
|
import { NavigationContainer } from '@react-navigation/native'
|
|
|
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
|
2020-10-18 20:47:15 -04:00
|
|
|
import SplashScreen from 'react-native-splash-screen';
|
2020-08-09 17:01:25 -04:00
|
|
|
import Home from './Home'
|
|
|
|
import Calendar from './Calendar'
|
|
|
|
import Poll from './Poll'
|
|
|
|
import Clubs from './Clubs'
|
|
|
|
import More from './More'
|
2020-08-18 21:29:44 -04:00
|
|
|
import Staff from './Staff'
|
2020-10-18 20:47:15 -04:00
|
|
|
import OpeningPage from './OpeningPage';
|
|
|
|
import OpenPage from './OpenPage';
|
2020-08-09 16:37:46 -04:00
|
|
|
|
2020-08-09 17:01:25 -04:00
|
|
|
const Tab = createBottomTabNavigator();
|
2020-08-09 16:37:46 -04:00
|
|
|
|
|
|
|
class App extends React.Component {
|
2020-10-18 20:47:15 -04:00
|
|
|
state = {
|
|
|
|
loaded: false
|
|
|
|
}
|
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
OpeningPage.load(v => this.setState({loaded: true}));
|
|
|
|
}
|
2020-08-09 16:37:46 -04:00
|
|
|
render() {
|
|
|
|
return (
|
2020-08-10 09:52:12 -04:00
|
|
|
<NavigationContainer >
|
2020-10-18 20:47:15 -04:00
|
|
|
{this.state.loaded ?
|
2020-08-10 09:52:12 -04:00
|
|
|
<Tab.Navigator tabBarOptions={{
|
2020-08-10 09:54:41 -04:00
|
|
|
activeTintColor: 'red',
|
2020-08-10 09:52:12 -04:00
|
|
|
labelStyle:{
|
2020-08-18 21:29:44 -04:00
|
|
|
fontSize:16
|
2020-08-10 09:52:12 -04:00
|
|
|
}}}>
|
2020-08-18 21:29:44 -04:00
|
|
|
<Tab.Screen name="Home" component={Home} />
|
2020-08-09 17:01:25 -04:00
|
|
|
<Tab.Screen name="Calendar" component={Calendar} />
|
|
|
|
<Tab.Screen name="Polls" component={Poll} />
|
2020-10-18 20:47:15 -04:00
|
|
|
<Tab.Screen name="Clubs" component={Clubs} options ={{title: 'Clubs'}}/>
|
2020-08-18 21:29:44 -04:00
|
|
|
<Tab.Screen name="Staff" component={Staff} />
|
2020-08-09 17:01:25 -04:00
|
|
|
<Tab.Screen name="More" component={More} />
|
2020-08-09 16:37:46 -04:00
|
|
|
</Tab.Navigator>
|
2020-10-18 20:47:15 -04:00
|
|
|
: <OpenPage />}
|
2020-08-09 16:37:46 -04:00
|
|
|
</NavigationContainer>
|
2020-10-18 20:47:15 -04:00
|
|
|
);
|
2020-08-09 16:37:46 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default App;
|