kia-ml
Version:
Kia
77 lines (75 loc) • 2.84 kB
JavaScript
/**
* This is the navigator you will modify to display the logged-in screens of your app.
* You can use RootNavigator to also display an auth flow or other user flows.
*
* You'll likely spend most of your time in this file.
*/
import React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
import { CreateScreen, NewSearchScreen, SearchScreen, BookmarksScreen, ExploreScreen, DetailsScreen, DemoScreen, DemoListScreen, HomeScreen } from '../screens';
/**
* This type allows TypeScript to know what routes are defined in this navigator
* as well as what properties (if any) they might take when navigating to them.
*
* If no params are allowed, pass through `undefined`. Generally speaking, we
* recommend using your MobX-State-Tree store(s) to keep application state
* rather than passing state through navigation params.
*
* For more information, see this documentation:
* https://reactnavigation.org/docs/params/
* https://reactnavigation.org/docs/typescript#type-checking-the-navigator
*/
// Documentation: https://reactnavigation.org/docs/stack-navigator/
const Stack = createStackNavigator();
export function MainNavigator() {
return /*#__PURE__*/React.createElement(Stack.Navigator, {
screenOptions: {
cardStyle: {
backgroundColor: 'transparent'
},
headerShown: false
}
}, /*#__PURE__*/React.createElement(Stack.Screen, {
name: "home",
component: HomeScreen
}), /*#__PURE__*/React.createElement(Stack.Screen, {
name: "explore",
component: ExploreScreen
}), /*#__PURE__*/React.createElement(Stack.Screen, {
name: "bookmarks",
component: BookmarksScreen
}), /*#__PURE__*/React.createElement(Stack.Screen, {
name: "details",
component: DetailsScreen
}), /*#__PURE__*/React.createElement(Stack.Screen, {
name: "search",
component: SearchScreen
}), /*#__PURE__*/React.createElement(Stack.Screen, {
name: "create",
component: CreateScreen
}), /*#__PURE__*/React.createElement(Stack.Screen, {
name: "newSearch",
component: NewSearchScreen
}), /*#__PURE__*/React.createElement(Stack.Screen, {
name: "welcome",
component: HomeScreen
}), /*#__PURE__*/React.createElement(Stack.Screen, {
name: "demo",
component: DemoScreen
}), /*#__PURE__*/React.createElement(Stack.Screen, {
name: "demoList",
component: DemoListScreen
}));
}
/*
* A list of routes from which we're allowed to leave the app when
* the user presses the back button on Android.
*
* Anything not on this list will be a standard `back` action in
* react-navigation.
*
* `canExit` is used in ./app/app.tsx in the `useBackButtonHandler` hook.
*/
const exitRoutes = ['home'];
export const canExit = routeName => exitRoutes.includes(routeName);
//# sourceMappingURL=main-navigator.js.map