Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createStackNavigator(routeConfigMap, stackConfig = {}) {
const router = StackRouter(routeConfigMap, stackConfig);
// Create a navigator with StackView as the view
let Navigator = createNavigator(StackView, router, stackConfig);
// if (!stackConfig.disableKeyboardHandling) {
// Navigator = createKeyboardAwareNavigator(Navigator, stackConfig);
// }
return Navigator;
}
const Settings = require('./').default
return (
)
}
}
const SettingsSubNavigator = createNavigator(
SettingsSubNav,
StackRouter(Shim.shim(settingsSubRoutes), {initialRouteName: Constants.accountTab}),
{}
)
SettingsSubNavigator.navigationOptions = {
title: 'Settings',
}
export const newRoutes = {
// MUST use screen and not getScreen for subnavs!
settingsRoot: {screen: SettingsSubNavigator},
}
export const newModalRoutes = {
[Constants.logOutTab]: {getScreen: (): typeof LogOutTab => require('./logout/container').default},
// TODO connect broken
return (
{scene}
<header> childNav.pop()} allowBack={index !== 0} />
)
}
}
const MainNavigator = createNavigator(
AppView,
StackRouter(Shim.shim(routes), {initialRouteName: 'tabs.peopleTab'}),
{}
)
class ModalView extends React.PureComponent {
render() {
const navigation = this.props.navigation
const index = navigation.state.index
const activeKey = navigation.state.routes[index].key
const descriptor = this.props.descriptors[activeKey]
const childNav = descriptor.navigation
// We render the app below us
const appKey = this.props.navigation.state.routes[0].key
const appNav = this.props.navigation.getChildNavigation(appKey)</header>
function createStackNavigator(routeConfigMap, stackConfig = {}) {
const router = StackRouter(routeConfigMap, stackConfig);
// Create a navigator with StackView as the view
let Navigator = createNavigator(StackView, router, stackConfig);
if (!stackConfig.disableKeyboardHandling) {
Navigator = createKeyboardAwareNavigator(Navigator, stackConfig);
}
return Navigator;
}
About Brent
<div>
</div>
);
}
}
const AppNavigator = createNavigator(
SidebarView,
SwitchRouter({
Home,
About,
Profile
}),
{}
);
const App = createBrowserApp(AppNavigator);
export default App;
component={descriptor.getComponent()}
screenProps={this.props.screenProps || noScreenProps}
/>
)
return (
{sceneView}
)
}
}
const tabs = Shared.desktopTabs
const TabNavigator = createNavigator(
TabView,
SwitchRouter(
tabs.reduce((map, tab) => {
map[tab] = createNavigator(
AppView,
StackRouter(Shim.shim(routes), {
initialRouteName: tabRoots[tab],
initialRouteParams: undefined,
}),
{}
)
return map
}, {}),
{backBehavior: 'none', resetOnBlur: false}
),
{}
return (
)
}
}
const WalletsSubNavigator = createNavigator(
WalletsSubNav,
StackRouter(Shim.shim(walletsSubRoutes), {initialRouteName: 'wallet'}),
{}
)
const OnboardingOrWalletsNavigator = createSwitchNavigator(
{
onboarding: RoutedOnboarding,
walletsubnav: WalletsSubNavigator,
},
{initialRouteName: 'onboarding'}
)
type OnboardingOrWalletsProps = NavigationViewProps & {acceptedDisclaimer: boolean}
class _OnboardingOrWallets extends React.Component {
static router = OnboardingOrWalletsNavigator.router
)}
)
}
}
const LoggedInStackNavigator = createNavigator(
ModalView,
StackRouter(
{
Main: {screen: MainNavigator},
...Shim.shim(modalRoutes),
},
{}
),
{}
)
const LoggedOutStackNavigator = createNavigator(
AppView,
StackRouter(
{...Shim.shim(loggedOutRoutes)},
{
<button> navigation.push('HomeScreen')}
title="Go Home"
/>
</button><button> navigation.goBack()} title="Go Back" />
);
}
}
const App = createNavigator(
Transitioner,
StackRouter({
HomeScreen,
ProfileScreen,
}),
{}
);
export default App;
</button>
tabs.reduce((map, tab) => {
map[tab] = createNavigator(
AppView,
StackRouter(Shim.shim(routes), {
initialRouteName: tabRoots[tab],
initialRouteParams: undefined,
}),
{}
)
return map
}, {}),
{backBehavior: 'none', resetOnBlur: false}