2017-09-21 17:08:00 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { TouchableOpacity } from 'react-native';
|
|
|
|
import { StackNavigator } from 'react-navigation';
|
|
|
|
import Icon from 'react-native-vector-icons/FontAwesome';
|
|
|
|
|
|
|
|
import ListServerView from '../../views/ListServerView';
|
|
|
|
import NewServerView from '../../views/NewServerView';
|
|
|
|
import LoginView from '../../views/LoginView';
|
2017-11-07 16:28:02 +00:00
|
|
|
import RegisterView from '../../views/RegisterView';
|
2017-11-13 13:32:46 +00:00
|
|
|
|
|
|
|
import TermsServiceView from '../../views/TermsServiceView';
|
|
|
|
import PrivacyPolicyView from '../../views/PrivacyPolicyView';
|
2017-11-10 13:42:02 +00:00
|
|
|
import ForgotPasswordView from '../../views/ForgotPasswordView';
|
2017-09-21 17:08:00 +00:00
|
|
|
|
|
|
|
const PublicRoutes = StackNavigator(
|
|
|
|
{
|
|
|
|
ListServer: {
|
|
|
|
screen: ListServerView,
|
|
|
|
navigationOptions({ navigation }) {
|
|
|
|
return {
|
|
|
|
title: 'Servers',
|
|
|
|
headerRight: (
|
|
|
|
<TouchableOpacity
|
|
|
|
onPress={() => navigation.navigate('AddServer')}
|
|
|
|
style={{ width: 50, alignItems: 'center' }}
|
|
|
|
>
|
|
|
|
<Icon name='plus' size={16} />
|
|
|
|
</TouchableOpacity>
|
|
|
|
)
|
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
AddServer: {
|
|
|
|
screen: NewServerView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'New server'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
Login: {
|
|
|
|
screen: LoginView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Login'
|
|
|
|
}
|
2017-11-07 16:28:02 +00:00
|
|
|
},
|
|
|
|
Register: {
|
|
|
|
screen: RegisterView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Register'
|
|
|
|
}
|
2017-11-10 13:42:02 +00:00
|
|
|
},
|
2017-11-13 13:32:46 +00:00
|
|
|
TermsService: {
|
|
|
|
screen: TermsServiceView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Terms of service'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
PrivacyPolicy: {
|
|
|
|
screen: PrivacyPolicyView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Privacy policy'
|
|
|
|
}
|
|
|
|
},
|
2017-11-10 13:42:02 +00:00
|
|
|
ForgotPassword: {
|
|
|
|
screen: ForgotPasswordView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Forgot my password'
|
|
|
|
}
|
2017-09-21 17:08:00 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
export default PublicRoutes;
|