react-native/Examples/UIExplorer/UIExplorerStateTitleMap.js
Konstantin Raev 29e6bac17a Fixed UIExplorerStateTitleMap.js being .ios only
Reviewed By: foghina

Differential Revision: D2977953

fb-gh-sync-id: de650f82535fa4389602ce8b743ddf0442324c87
shipit-source-id: de650f82535fa4389602ce8b743ddf0442324c87
2016-02-25 14:57:08 -08:00

33 lines
1.0 KiB
JavaScript

/**
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* @flow
*/
'use strict';
const UIExplorerList = require('./UIExplorerList');
import type {NavigationState} from 'NavigationStateUtils';
function StateTitleMap(state: NavigationState): string {
if (UIExplorerList.Modules[state.key]) {
return UIExplorerList.Modules[state.key].title
}
if (state.key === 'AppList') {
return 'UIExplorer';
}
return 'Unknown';
}
module.exports = StateTitleMap;