This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
Sphere/app/components/navigation/RouteMapper.js
2016-02-11 20:45:40 +00:00

34 lines
712 B
JavaScript

import React from 'react-native'; // eslint-disable-line no-unused-vars
import NavigationTitle from './Title';
import NavigationBackButton from './BackButton';
import NavigationInfoButton from './InfoButton';
import { View } from 'react-native';
export default {
LeftButton(route, nav, index, navState) {
if (index === 0) {
return <View />;
}
return (
<NavigationBackButton nav={nav} />
);
},
RightButton(route, nav, index, navState) {
if (route.id === 'login') {
return <NavigationInfoButton nav={nav} route={route} />;
}
return <View />;
},
Title(route, nav, index, navState) {
return (
<NavigationTitle route={route} />
);
},
};