Skip to content
Snippets Groups Projects
Commit fca73c36 authored by Andrea Magnussen's avatar Andrea Magnussen
Browse files

Added documentation to nacigation screens

parent 1fd36355
Branches
No related tags found
1 merge request!70Resolve "Add comments to all files"
......@@ -6,6 +6,11 @@ import SignUpScreen from "../screens/SignUpScreen";
const AuthStack = createStackNavigator();
/**
* A stack navigator that contains the authentication screens.
*
* @returns the component
*/
const AuthStackScreen = () => (
<AuthStack.Navigator
screenOptions={{
......
......
......@@ -17,6 +17,11 @@ import { EditLocationScreen } from "../screens/home/EditLocationScreen";
const ModalStack = createStackNavigator();
/**
* A stack navigator which contains all screens that is a modal. It if fairly large, and could be organized in a better way?
*
* @returns the component
*/
const ModalStackScreen = () => (
<ModalStack.Navigator
screenOptions={{
......
......
......@@ -7,6 +7,13 @@ import ModalStackScreen from "./ModalStackScreen";
const RootStack = createStackNavigator();
/**
* A stack navigator that contains the three navigator screens TabsScreen, AuthstackScreen and ModalStackScreen.
*
* @param {String} usertoken - will display the app screens if there are a usertoken, displays the authstack screens if there are none.
*
* @returns the component
*/
const RootStackScreen = ({ userToken }) => (
<RootStack.Navigator headerMode="none" mode="modal">
{userToken ? (
......
......
......@@ -14,6 +14,12 @@ const HomeStack = createStackNavigator();
const CameraStack = createStackNavigator();
const ProfileStack = createStackNavigator();
/**
* The TabsScreen consists of three stack navigator screens, home, camera and profile.
*
* @returns the component
*/
const ProfileStackScreen = () => (
<ProfileStack.Navigator
initialRouteName="Profile"
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment