Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import * as firebase from 'firebase';
  3.  
  4. import { createAppContainer } from 'react-navigation';
  5. import { createDrawerNavigator,DrawerItems } from 'react-navigation-drawer';
  6.  
  7. import { createStackNavigator } from 'react-navigation-stack';
  8.  
  9. import {
  10.  
  11. StyleSheet,
  12. Text,
  13. View,
  14. TextInput,
  15. Button,
  16. TouchableHighlight,
  17. Image,
  18. Alert,
  19. Linking,
  20. Navigator,SafeAreaView,ScrollView,StatusBar
  21. } from 'react-native';
  22. import LoginView from './src/Pages/LoginView'
  23. import Home from './src/Pages/Home'
  24. import UpComingEvents from './src/Pages/UpComingEvents'
  25. import ItemComponent from './src/Pages/ItemComponent'
  26. import EventDescription from './src/Pages/EventDescription'
  27. import {db} from './src/ConfigDB'
  28. import AddingEventScreen from './src/Pages/AddingEventScreen'
  29. import LOEvents from './src/Pages/LOEvents'
  30. import { hide } from 'expo/build/launch/SplashScreen';
  31.  
  32.  
  33.  
  34.  
  35. // Your web app's Firebase configuration
  36.  
  37. //---------------------------------------
  38.  
  39. // const firebaseConfig = {
  40. // apiKey: "AIzaSyBGiV5bM6gwohkupysMuAUIwAWst9JrIcs",
  41. // authDomain: "asuevents-7260f.firebaseapp.com",
  42. // databaseURL: "https://asuevents-7260f.firebaseio.com",
  43. // projectId: "asuevents-7260f",
  44. // storageBucket: "asuevents-7260f.appspot.com",
  45. // messagingSenderId: "91741044897",
  46. // appId: "1:91741044897:web:d6b4b496209e9e21da30e0",
  47. // measurementId: "G-V98KYBR2YW"
  48. // };
  49. // firebase.initializeApp(firebaseConfig);
  50. //---------------------------------------------
  51. // Login = (id, password) => {
  52. // try {
  53. // firebase
  54. // .auth()
  55. // .signInWithEmailAndPassword(id, password)
  56. // .then(res => {
  57. // console.log(res.user.id);
  58. // });} catch (error) {
  59. // console.log(error.toString(error));
  60. // }
  61. // };
  62.  
  63. // ------------------------------------------------
  64.  
  65.  
  66.  
  67. const AppDrawerNavigator=createDrawerNavigator(
  68.  
  69. {
  70.  
  71. Home: {
  72. screen:LoginView,
  73. navigationOptions:{
  74. title:"Home",
  75. headerLeft:false,
  76.  
  77. }
  78. },
  79.  
  80. Details: {
  81. screen:Home,
  82. navigationOptions:{
  83. title:"Faculties",
  84. headerLeft:null,
  85.  
  86. }
  87. },
  88.  
  89. EventsDetails: {
  90. screen:EventDescription,
  91. navigationOptions:{
  92. header:null,
  93. }
  94. },
  95.  
  96. LOEve: {
  97. screen:LOEvents,
  98. navigationOptions:{
  99. title:"UPcoming Events"
  100.  
  101. }
  102. },
  103.  
  104. AddingEvents: {
  105. screen:AddingEventScreen,
  106. navigationOptions:{
  107. header:null,
  108.  
  109.  
  110. }
  111. },
  112.  
  113.  
  114.  
  115.  
  116.  
  117. },
  118.  
  119. {
  120. initialRouteName: 'Home',
  121. }
  122. );
  123.  
  124.  
  125. const CustomDrawerComponent=(props)=>(
  126. <SafeAreaView style={{flex:1}}>
  127. <View style={{height:150,backgroundColor:'blue',alignItems:'center',justifyContent:'center'}}>
  128. <Image source={require('./assets/aa1.jpg')} style={{height:120,width:120,
  129. borderRadius:60}} />
  130. </View>
  131. <ScrollView>
  132. <DrawerItems {...props}/>
  133.  
  134.  
  135. </ScrollView>
  136. </SafeAreaView>
  137. )
  138.  
  139.  
  140.  
  141. const AppContainer = createAppContainer(AppDrawerNavigator);
  142.  
  143.  
  144.  
  145. export default class App extends React.Component {
  146.  
  147. componentDidMount() {
  148. StatusBar.setHidden(true);
  149. }
  150. render() {
  151. return <AppContainer />;
  152. }
  153. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement