Skip to content

Commit

Permalink
Merge pull request #19 from BramSrna/ResolveBack
Browse files Browse the repository at this point in the history
Iteration 1 Milestone
  • Loading branch information
haseebakhan10 authored Nov 5, 2019
2 parents 970a8cc + 811341d commit 683cc29
Show file tree
Hide file tree
Showing 29 changed files with 1,295 additions and 490 deletions.
File renamed without changes
Binary file modified Application/assets/icons/delete_button.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Application/assets/icons/down_button.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Application/assets/icons/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Application/assets/icons/new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Application/assets/icons/new_list_button.png
Binary file not shown.
Binary file modified Application/assets/icons/up_button.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 0 additions & 42 deletions Application/navigation/CrowdSourceNavigator.js

This file was deleted.

81 changes: 66 additions & 15 deletions Application/navigation/MainDrawerNavigator.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,94 @@
import {
createDrawerNavigator,
createAppContainer
createAppContainer,
createStackNavigator
} from 'react-navigation';
import HomePage from '../pages/HomePage';
import YourLists from '../pages/YourLists'
import CurrentList from '../pages/CurrentList'
import MapCreatorPage from '../pages/MapCreatorPage'
import SideMenu from './SideMenu';
import RegisterItemPage from '../pages/RegisterItemPage'
import CrowdSourcePage from '../pages/CrowdSourcePage';
import AddItemLocationPage from '../pages/AddItemLocationPage';

import CrowdSourcePage from '../pages/CrowdSourcePage'
import CrowdSourceNavigator from './CrowdSourceNavigator';

const MainDrawerNavigator = createDrawerNavigator({
const StackNavigator = createStackNavigator({
Home: {
screen: HomePage
},
CrowdSourceOptionPage: {
screen: CrowdSourcePage,
navigationOptions:{
drawerLabel: "Crowd Source Options"
AddItemLocationPage: {
screen: AddItemLocationPage
},
MapCreatorPage: {
screen: MapCreatorPage
},
YourListsPage: {
screen: YourLists
},
CurrentListPage: {
screen: CurrentList
},
CrowdSourcePage: {
screen: CrowdSourcePage
},
RegisterItemPage: {
screen: RegisterItemPage
},
}, {
//TODO
initialRouteName: "YourListsPage",
headerMode: "none"
});

const MainDrawerNavigator = createDrawerNavigator({
Home: {
screen: StackNavigator,
navigationOptions: {
drawerLabel: "Home"
}
},
CrowdSource: {
screen: CrowdSourceNavigator
AddItemLocationPage: {
screen: StackNavigator,
navigationOptions: {
drawerLabel: "Add Item Location"
}
},
MapCreatorPage: {
screen: StackNavigator,
navigationOptions: {
drawerLabel: "Map a Store"
}
},
YourListsPage: {
screen: YourLists,
screen: StackNavigator,
navigationOptions: {
drawerLabel: "Your Lists"
}
},
CrowdSourcePage: {
screen: StackNavigator,
navigationOptions: {
drawerLabel: () => null
}
},
RegisterItemPage: {
screen: StackNavigator,
navigationOptions: {
drawerLabel: "Register an Item"
}
},
CurrentListPage: {
screen: CurrentList,
screen: StackNavigator,
navigationOptions: {
drawerLabel: () => null
}
}

},

}, {
gesturesEnabled: false
gesturesEnabled: false,
contentComponent: SideMenu,
drawerWidth: 250
});

const App = createAppContainer(MainDrawerNavigator);
Expand Down
3 changes: 0 additions & 3 deletions Application/navigation/RootNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ import LoginPage from "../pages/LoginPage";
import ForgotPasswordPage from "../pages/ForgotPasswordPage";
import VerificationPage from "../pages/VerificationPage";
import RegisterPage from "../pages/RegisterPage";
import MainDrawerNavigator from './MainDrawerNavigator';

const RootStackNavigator = createStackNavigator(
{
Login: {screen: LoginPage},
ForgotPassword: {screen: ForgotPasswordPage},
Registration: {screen:RegisterPage},
Verification: {screen: VerificationPage},

Main: { screen: MainDrawerNavigator, },
},
{
headerMode: "none"
Expand Down
72 changes: 72 additions & 0 deletions Application/navigation/SideMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import styles from './SideMenuStyle';
import { NavigationActions } from 'react-navigation';
import { ScrollView, Text, View } from 'react-native';
import firebase from 'firebase';

class SideMenu extends Component {

constructor(props) {
super(props)
}
navigateToScreen = (route) => () => {
if (route == 'Logout') {
firebase.auth().signOut();
} else {
const navigateAction = NavigationActions.navigate({
routeName: route
});
this.props.navigation.dispatch(navigateAction);
}
}

render() {
return (
<View style={styles.container}>
<ScrollView>
<View>
<Text style={styles.sectionHeadingStyle}>
Your Data
</Text>
<View style={styles.navSectionStyle}>
{/* <Text style={styles.navItemStyle} onPress={this.navigateToScreen('Home')}>
Home
</Text> */}
<Text style={styles.navItemStyle} onPress={this.navigateToScreen('YourListsPage')}>
Your Lists
</Text>
</View>
</View>
<View>
<Text style={styles.sectionHeadingStyle}>
Feedback
</Text>
<View style={styles.navSectionStyle}>
<Text style={styles.navItemStyle} onPress={this.navigateToScreen('AddItemLocationPage')}>
Add Item Location
</Text>
<Text style={styles.navItemStyle} onPress={this.navigateToScreen('MapCreatorPage')}>
Map a Store
</Text>
<Text style={styles.navItemStyle} onPress={this.navigateToScreen('RegisterItemPage')}>
Register an Item
</Text>
</View>
</View>
</ScrollView>
<View style={styles.footerContainer}>
<Text onPress={this.navigateToScreen('Logout')}>
Sign Out
</Text>
</View>
</View>
);
}
}

SideMenu.propTypes = {
navigation: PropTypes.object
};

export default SideMenu;
26 changes: 26 additions & 0 deletions Application/navigation/SideMenuStyle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export default {
container: {
paddingTop: 35,
flex: 1,
backgroundColor: 'black',
color: 'white',
},
navItemStyle: {
padding: 10,
paddingHorizontal: 30
},
navSectionStyle: {
backgroundColor: 'white'
},
sectionHeadingStyle: {
paddingVertical: 10,
paddingHorizontal: 10,
color: 'white',
fontWeight: 'bold',
fontSize: 20
},
footerContainer: {
padding: 20,
backgroundColor: 'white',
}
};
Loading

0 comments on commit 683cc29

Please sign in to comment.