Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
icon: Images.chevronLeftIcon,
color: Colors.snow,
iconColor: Colors.snow
},
background: {
color: Colors.background
}
},
sideMenu: {
left: {
enabled: false
}
}
})
Navigation.setRoot(appStack)
// handle app state and deep links
AppState.addEventListener('change', handleAppStateChange)
Linking.addEventListener('url', handleOpenURL)
})
}
text={"退出登录"} onPress={() => {
Navigation.setRoot({root: LoginComponent()}).then();
}}/>
onCLickSetRoot() {
Navigation.setRoot({
root: {
component: {
name: 'navigation.playground.TextScreen'
}
}
});
}
onClickSwitchToSideMenus = () => {
Navigation.setRoot({
root: {
sideMenu: {
left: {
component: {
name: 'navigation.playground.SideMenuScreen',
passProps: {
side: 'left'
}
}
},
center: {
bottomTabs: {
children: [
{
stack: {
id: 'tab1Stack',
visible: true,
title: {
color: theme.sidebarHeaderTextColor,
text: title,
},
backButton: {
color: theme.sidebarHeaderTextColor,
title: '',
},
background: {
color: theme.sidebarHeaderBg,
},
},
};
Navigation.setRoot({
root: {
stack: {
children: [{
component: {
name,
passProps,
options: merge(defaultOptions, options),
},
}],
},
},
});
}
if (newVersion) {
setAppVersion(currentAppVersion);
}
const { setLocale, setRTL } = setI18nConfig(locale);
const store = configureStore({
device: { locale: setLocale, isRTL: setRTL, appVersion, museumMode },
});
audioActor(store);
chargingActor(store);
beaconActor(store);
registerScreens(store);
await Navigation.setRoot({
root: {
bottomTabs: {
options: {
bottomTabs: {
backgroundColor: OFF_BLACK,
currentTabIndex: 1,
},
},
children: [
{
stack: {
children: [
{
component: {
name: 'nearMe',
},
goToHome() {
Navigation.setRoot({root: AppTableHome()}).then();
}
}
onSideMenuLayoutInsideBottomTabPressed = () => {
Navigation.dismissAllModals();
Navigation.setRoot({
root: {
bottomTabs: {
children: [
{
stack: {
children: [
{
component: {
name: 'navigation.playground.TextScreen',
options: {
topBar: {
animate: false
}
}
}
}
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
stack: {
children: [
{
component: {
name: 'blog.PostsList',
options: {
topBar: {
title: {
text: 'Blog'
}
}
}
}
}
],
function setRootToHomeTab() {
Navigation.setRoot({
root: {
bottomTabs: {
children: [
{
stack: {
children: [
{
component: {
name: PROFILE,
passProps: {},
},
},
],
options: {
bottomTab: {
text: i18n.t('menu_tabbar_user'),