Repository navigation
Expand file tree
/
Copy pathApp.js
More file actions
88 lines (78 loc) · 3.38 KB
/
Copy pathApp.js
File metadata and controls
88 lines (78 loc) · 3.38 KB
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
import * as React from 'react';
import 'react-native-gesture-handler';
import firebase from 'firebase';
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import MainScreen from './Screens/MainScreen';
import ManagerScreen from './Screens/ManagerScreen';
import RegUserScreen from './Screens/RegUserScreen';
import HomeScreen from './Screens/HomeScreen';
import LoanPoolsScreen from './Screens/LoanPoolsScreen';
import AmountSpecificationScreen from './Screens/Requesting Loan/AmountSpecificationScreen';
import DateSpecification from './Screens/Requesting Loan/DateSpecification';
import PaymentFrequency from './Screens/Requesting Loan/PaymentFrequency';
import VerificationScreen from './Screens/Requesting Loan/VerificationScreen';
import InterestScreen from './Screens/Requesting Loan/InterestScreen';
import SummaryScreen from './Screens/Requesting Loan/SummaryScreen';
import SettingsScreen from './Screens/SettingsScreen';
import ReceivedRequests from './Screens/ReceivedRequests';
import GeneralRequests from './Screens/GeneralRequests';
import Profile from './Screens/Profile/Profile';
import AddBalance from './Screens/Profile/AddBalance';
import TransactionHistory from './Screens/Profile/TransactionHistory';
import Lending from './Screens/Lending/Lending';
import LendingSummary from './Screens/Lending/LendingSummary';
import LendingConfirmation from './Screens/Lending/LendingConfirmation';
import SentRequests from './Screens/SentRequests';
import CreateInterest from './Screens/CreateInterest';
import CreateLoansPools from './Screens/CreateLoansPools';
//here we establish connection to firebase.
const firebaseConfig = {
apiKey: "AIzaSyB7fXfYE4BuVeWWaTNaRPlFvMKXlSkX298",
authDomain: "microlending-9a33b.firebaseapp.com",
databaseURL: "https://microlending-9a33b-default-rtdb.firebaseio.com",
projectId: "microlending-9a33b",
storageBucket: "microlending-9a33b.appspot.com",
messagingSenderId: "846587248834",
appId: "1:846587248834:web:319b97453b3bef3978bb5b"
};
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
} else {
firebase.app();
}
//This Stacknavigator is where you specify the names of the pages the app will navigate through. Initialroute is defined (the very first log-in page)
const AppNavigator = createStackNavigator({
Home: HomeScreen,
Main: MainScreen,
ManagerScreen: ManagerScreen,
RegUser: RegUserScreen,
LoanPools: LoanPoolsScreen,
AmountScreen: AmountSpecificationScreen,
DateScreen: DateSpecification,
PaymentPlan: PaymentFrequency,
Verification: VerificationScreen,
Interest: InterestScreen,
Summary: SummaryScreen,
Settings: SettingsScreen,
ReceivedRequests: ReceivedRequests,
GeneralRequests: GeneralRequests,
Profile: Profile,
AddBalance: AddBalance,
History: TransactionHistory,
Lending: Lending,
LendingSummary: LendingSummary,
LendingConfirmation: LendingConfirmation,
SentRequests: SentRequests,
CreateInterest: CreateInterest, //Commented this out since it was causing the "main not found" expo error. Feel free to uncomment once the component is built!
CreateLoansPools: CreateLoansPools,
},
{
initialRouteName: 'Home'
});
const AppContainer = createAppContainer(AppNavigator);
export default class App extends React.Component {
render() {
return <AppContainer />;
}
}