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

Added documentation to authentication screens

parent f3d68b50
No related branches found
No related tags found
1 merge request!70Resolve "Add comments to all files"
......@@ -19,6 +19,13 @@ import { Button } from "react-native-paper";
import CustomActivityIndicator from "../components/CustomActivityIndicator";
import { NAME_MAX_LENGTH } from "../constants/inputRequirements";
/**
* This component renders the screen where the user can sign in. The actual sign in process is done in a user action through redux.
*
* @param {*} props - used for redux and navigation.
*
* @returns the component.
*/
const _SignInScreen = (props) => {
const { onUserLogin } = props;
......
......@@ -24,6 +24,14 @@ import APIKit from "../APIkit";
import CustomActivityIndicator from "../components/CustomActivityIndicator";
import { toast500, toastError, toastSuccess } from "../constants/toasts";
/**
* This component renders the screen where the user can create a new user. They will be navigated to the sign in screen when the user is
* created, and has to wait for an administrator to grant them access to use the application.
*
* @param {*} navigation - extracted from props, used for navigation
*
* @returns the component.
*/
const SignUpScreen = ({ navigation }) => {
const [name, setName] = useState("");
const [email, setEmail] = useState("");
......
......@@ -12,6 +12,15 @@ import APIKit from "../APIkit";
import CustomActivityIndicator from "../components/CustomActivityIndicator";
import { toast500, toastError } from "../constants/toasts";
/**
* This component renders the screen where the user needs to re-authenticate to get access to a critical feature.
*
* @param {*} route - extracted from props, used to get data from the previous screen. In this case, to know which screen should be
* navigated to next.
* @param {*} navigation - extracted from props, used for navigation.
*
* @returns the component.
*/
const VerifyPasswordScreen = ({ route, navigation }) => {
const { nextNavigation } = route.params;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment