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

35 lines
712 B
JavaScript
Raw Permalink Normal View History

2016-02-06 15:07:29 +00:00
import React from 'react-native'; // eslint-disable-line no-unused-vars
import NavigationTitle from './Title';
import NavigationBackButton from './BackButton';
2016-02-06 16:46:41 +00:00
import NavigationInfoButton from './InfoButton';
2016-02-06 15:07:29 +00:00
import { View } from 'react-native';
export default {
LeftButton(route, nav, index, navState) {
2016-02-11 20:45:40 +00:00
if (index === 0) {
return <View />;
}
2016-02-06 15:07:29 +00:00
return (
2016-02-06 16:46:41 +00:00
<NavigationBackButton nav={nav} />
2016-02-06 15:07:29 +00:00
);
},
RightButton(route, nav, index, navState) {
2016-02-11 20:45:40 +00:00
if (route.id === 'login') {
return <NavigationInfoButton nav={nav} route={route} />;
2016-02-06 16:46:41 +00:00
}
2016-02-11 20:45:40 +00:00
return <View />;
2016-02-06 15:07:29 +00:00
},
Title(route, nav, index, navState) {
return (
<NavigationTitle route={route} />
);
},
};