Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Additional Screens to TabNavigator #7

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions components/AboutScreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react';
import { StyleSheet, View} from 'react-native';
import { connect } from 'react-redux';
import WebSurface from './WebSurface.js';

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
marginTop: 20,
},
});

export const routeName = 'About';
const URL = 'http://mosaicchristian.org/mobilebeliefs';

class AboutScreen extends React.Component {
static navigationOptions = {
title: routeName,
};

render() {
return (
<View style={styles.container}>
<WebSurface name={routeName} url={URL} />
</View>
);
}
}

export default connect()(AboutScreen);
31 changes: 31 additions & 0 deletions components/GivingScreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react';
import { StyleSheet, View} from 'react-native';
import { connect } from 'react-redux';
import WebSurface from './WebSurface.js';

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
marginTop: 20,
},
});

export const routeName = 'Giving';
const URL = 'http://mosaicchristian.org/mobilegive';

class GivingScreen extends React.Component {
static navigationOptions = {
title: routeName,
};

render() {
return (
<View style={styles.container}>
<WebSurface name={routeName} url={URL} />
</View>
);
}
}

export default connect()(GivingScreen);
31 changes: 31 additions & 0 deletions components/SermonScreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react';
import { StyleSheet, View} from 'react-native';
import { connect } from 'react-redux';
import WebSurface from './WebSurface.js';

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
marginTop: 20,
},
});

export const routeName = 'Sermons';
const URL = 'http://mosaicchristian.org/mobilesermons';

class SermonScreen extends React.Component {
static navigationOptions = {
title: routeName,
};

render() {
return (
<View style={styles.container}>
<WebSurface name={routeName} url={URL} />
</View>
);
}
}

export default connect()(SermonScreen);
7 changes: 7 additions & 0 deletions navigators/AppNavigator.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { TabNavigator } from 'react-navigation';
import HomeScreen, {routeName as homeRoute} from '../components/HomeScreen.js';
import SermonScreen, {routeName as sermonRoute} from '../components/SermonScreen.js';
import AboutScreen, {routeName as aboutRoute} from '../components/AboutScreen.js';
import GivingScreen, {routeName as givingRoute} from '../components/GivingScreen.js';

export const screens = {
[homeRoute]: { screen: HomeScreen},
[sermonRoute]: { screen: SermonScreen},
[aboutRoute]: { screen: AboutScreen},
[givingRoute]: { screen: GivingScreen},

};

export const AppNavigator = TabNavigator(screens);
Expand Down