Skip to content

Navigation

Martha Sharpe edited this page Nov 4, 2020 · 4 revisions

Navigation

This app uses react-navigation for routing between screens. The navigation folder holds all files associated with navigating.

RootNavigation creates a ref to the navigators, so that navigation may be handled anywhere in the app. Including Redux action creators.

AuthNavigator handles login. It handles auto-login if there is a valid token stored. It then hides the splash screen and conditionally renders either the login screen or the drawer navigator if there is a logged in user.

DrawerNavigator contains the three main stack navigators in the app: Dashboard, Orders, and Routing. It also has the Logout button. The drawer also conditionally contains a DSPRScreen if the user has more than one DSPR Driver. The drawer may be opened or closed by swiping from the left or by pressing the hamburger menu in the header.

DashboardNavigator is a stack navigator containing the DashboardScreen.

OrderListNavigator is a stack navigator containing the OrderListScreen, from which the user may navigate to the OrderDetails screen, and from there to the ManageNotesScreen.

RoutingNavigator is a stack navigator containing the RoutingScreen, from which the user may navigate to the OrderDetails screen, and from there to the ManageNotesScreen.

Clone this wiki locally