import { Navigation , Options } from '@ulangi/react-native-navigation' ; import * as _ from 'lodash' ; import { Platform } from 'react-native' ; import { config } from '../constants/config' ; import { shortDimension } from '../utils/responsive' ; export function setDefaultNavigationOptions ( ) { const common = { statusBar : { style : 'light' , } , topBar : { noBorder : true , backButton : { visible : false , } , title : { fontFamily : Platform . OS === 'android' ? config . styles . androidMainFontBold : config . styles . iosMainFontBold , } , } , popGesture : true , bottomTab : { selectedIconColor : config . styles . primaryColor , selectedTextColor : config . styles . primaryColor , } , bottomTabs : { animate : false , } , layout : { orientation : shortDimension > 480 ? undefined : [ 'portrait' ] , } , } ; const iOSOnly = { } ; const androidOnly = { statusBar : { backgroundColor : config . styles . darkPrimaryColor , } , topBar : { elevation : 0 , title : { alignment : 'center' , } , } , bottomTabs : { titleDisplayMode : 'alwaysShow' , } , } ; Navigation . setDefaultOptions ( _ . merge ( common , Platform . OS === 'android' ? androidOnly : iOSOnly ) ) ; }