diff --git a/app/components/routes/RouteMaster.js b/app/components/routes/RouteMaster.js index b372264..78b67ae 100644 --- a/app/components/routes/RouteMaster.js +++ b/app/components/routes/RouteMaster.js @@ -1,10 +1,15 @@ import { Map } from 'immutable'; import Login from './login'; +import Info from './info'; export default Map({ 'LOGIN': { id: 'login', component: Login + }, + 'INFO': { + id: 'info', + component: Info } }); diff --git a/app/components/routes/info.js b/app/components/routes/info.js new file mode 100644 index 0000000..3e4c636 --- /dev/null +++ b/app/components/routes/info.js @@ -0,0 +1,87 @@ +import React from 'react-native'; +import GlobalStyles from '../../settings/styles'; + +const { + StyleSheet, + Text, + View, + TouchableHighlight, + ScrollView, + BackAndroid, +} = React; + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#333', + }, + contentWrapper: { + flex: 0.85, + justifyContent: 'flex-start', + alignItems: 'center' + }, + button: { + flex: 0.08, + backgroundColor: GlobalStyles.get('CIRCLE_GREY'), + borderColor: GlobalStyles.get('CIRCLE_GREY'), + justifyContent: 'center', + alignItems: 'center', + padding: 10, + borderWidth: 2, + borderRadius: 12, + margin: 5 + }, + buttonText: { + fontSize: 18, + color: 'white', + }, + buttonContainer: { + flexDirection: 'row', + justifyContent: 'center', + margin: 5 + }, + title: { + fontSize: 30, + margin: 13, + flex: 1 + }, + text: { + color: 'white' + } +}); + +export default class Login extends React.Component { + + componentWillUnmount() { + BackAndroid.removeEventListener('hardwareBackPress', this.props.nav.pop); + } + + componentWillMount() { + BackAndroid.addEventListener('hardwareBackPress', this.props.nav.pop); + } + + render() { + return ( + + + + + BACK + + + + About + + + + + Content + + + + ); + } +}; diff --git a/app/components/routes/login.js b/app/components/routes/login.js index 1d39618..1b4d11e 100644 --- a/app/components/routes/login.js +++ b/app/components/routes/login.js @@ -1,6 +1,7 @@ import React from 'react-native'; import GlobalStyles from '../../settings/styles'; import TokenHelp from '../login/token-help'; +import RouteMaster from './RouteMaster'; const dismissKeyboard = require('dismissKeyboard'); @@ -99,7 +100,7 @@ export default class Login extends React.Component { } showAbout() { - + this.props.nav.push(RouteMaster.get('INFO')); } showTokenHelp() {