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

Documented camera screens

parent 28be9eff
No related branches found
No related tags found
1 merge request!70Resolve "Add comments to all files"
...@@ -23,6 +23,15 @@ import { toast500, toastError } from "../../constants/toasts"; ...@@ -23,6 +23,15 @@ import { toast500, toastError } from "../../constants/toasts";
const deviceWidth = Dimensions.get("window").width; const deviceWidth = Dimensions.get("window").width;
/**
* This component renders the camera screen. This screen consists of an image picker, which makes the user able to upload images from their phones
* library. It also consists of a built-in camera, where the user can take a photo while in the application. The user might need to grant premission for
* the app to be able to use the camera.
*
* @param {*} props - used for redux and navigation.
*
* @returns the component
*/
const _CameraScreen = (props) => { const _CameraScreen = (props) => {
const [isCameraMode, setShowCamera] = useState(false); const [isCameraMode, setShowCamera] = useState(false);
......
...@@ -36,6 +36,16 @@ const species = [ ...@@ -36,6 +36,16 @@ const species = [
const sexValues = {firstValue:"female", secondValue:"male", thirdValue:"juvenile", const sexValues = {firstValue:"female", secondValue:"male", thirdValue:"juvenile",
firstText:"Female", secondText:"Male", thirdText:"Juvenile"}; firstText:"Female", secondText:"Male", thirdText:"Juvenile"};
/**
* This component renders the screen where the user can register a new salamander entry. When the user has provided all mandatory data,
* the salamander will be matched agaist the other registered salamander with the same data (location, species, sex). If there is a match,
* a green popup screen will show, providing information about which salamander it was matched with. If there was no match, a white poput will show,
* and a new salamander will be registered in the database with a new ID.
*
* @param {*} props - used for redux, navigation and route to get data from the previous screen.
*
* @returns the component.
*/
const _RegisterSalamanderScreen = (props) => { const _RegisterSalamanderScreen = (props) => {
const { salamanderSex, salamanderSpecies, image } = props.route.params; const { salamanderSex, salamanderSpecies, image } = props.route.params;
const { userReducer, updateLocations, addLastLocation } = props; const { userReducer, updateLocations, addLastLocation } = props;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment