Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1 from infinitered/nav_update
Browse files Browse the repository at this point in the history
Nav update
  • Loading branch information
GantMan authored Mar 22, 2017
2 parents 15ef271 + e323764 commit 3a3d278
Show file tree
Hide file tree
Showing 20 changed files with 104 additions and 368 deletions.
5 changes: 2 additions & 3 deletions boilerplate/App/Containers/LoginScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { connect } from 'react-redux'
import Styles from './Styles/LoginScreenStyles'
import {Images, Metrics} from '../Themes'
import LoginActions from '../Redux/LoginRedux'
import { Actions as NavigationActions } from 'react-native-router-flux'

class LoginScreen extends React.Component {

Expand Down Expand Up @@ -42,7 +41,7 @@ class LoginScreen extends React.Component {
this.forceUpdate()
// Did the login attempt complete?
if (this.isAttempting && !newProps.fetching) {
NavigationActions.pop()
this.props.navigation.goBack()
}
}

Expand Down Expand Up @@ -142,7 +141,7 @@ class LoginScreen extends React.Component {
<Text style={Styles.loginText}>Sign In</Text>
</View>
</TouchableOpacity>
<TouchableOpacity style={Styles.loginButtonWrapper} onPress={NavigationActions.pop}>
<TouchableOpacity style={Styles.loginButtonWrapper} onPress={() => this.props.navigation.goBack()}>
<View style={Styles.loginButton}>
<Text style={Styles.loginText}>Cancel</Text>
</View>
Expand Down
4 changes: 2 additions & 2 deletions boilerplate/App/Containers/RootContainer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react'
import { View, StatusBar } from 'react-native'
import NavigationRouter from '../Navigation/NavigationRouter'
import Navigation from '../Navigation/AppNavigation'
import { connect } from 'react-redux'
import StartupActions from '../Redux/StartupRedux'
import ReduxPersist from '../Config/ReduxPersist'
Expand All @@ -21,7 +21,7 @@ class RootContainer extends Component {
return (
<View style={styles.applicationView}>
<StatusBar barStyle='light-content' />
<NavigationRouter />
<Navigation />
</View>
)
}
Expand Down
25 changes: 25 additions & 0 deletions boilerplate/App/Navigation/AppNavigation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { StackNavigator } from 'react-navigation'
import LaunchScreen from '../Containers/LaunchScreen'
import LoginScreen from '../Containers/LoginScreen'

import styles from './Styles/NavigationStyles'

// Manifest of possible screens
const PrimaryNav = StackNavigator({
LaunchScreen: { screen: LaunchScreen },
LoginScreen: {
screen: LoginScreen,
navigationOptions: { title: 'Login' }
}
}, {
// Default config for all screens
headerMode: 'none',
initialRouteName: 'LaunchScreen',
navigationOptions: {
header: {
style: styles.header
}
}
})

export default PrimaryNav
110 changes: 0 additions & 110 deletions boilerplate/App/Navigation/CustomNavBar.js

This file was deleted.

52 changes: 0 additions & 52 deletions boilerplate/App/Navigation/NavItems.js

This file was deleted.

53 changes: 0 additions & 53 deletions boilerplate/App/Navigation/NavigationDrawer.js

This file was deleted.

27 changes: 0 additions & 27 deletions boilerplate/App/Navigation/NavigationRouter.js

This file was deleted.

41 changes: 0 additions & 41 deletions boilerplate/App/Navigation/Styles/CustomNavBarStyles.js

This file was deleted.

21 changes: 0 additions & 21 deletions boilerplate/App/Navigation/Styles/NavItemsStyles.js

This file was deleted.

19 changes: 0 additions & 19 deletions boilerplate/App/Navigation/Styles/NavigationContainerStyles.js

This file was deleted.

Loading

0 comments on commit 3a3d278

Please sign in to comment.