diff --git a/screens/camera/CameraScreen.js b/screens/camera/CameraScreen.js index dfea32f4402e7cfa83bef38c63179e1aa993ed0a..0ebb2d2d5969123737f6ccf49f43e6fe6b3a518c 100644 --- a/screens/camera/CameraScreen.js +++ b/screens/camera/CameraScreen.js @@ -23,6 +23,15 @@ import { toast500, toastError } from "../../constants/toasts"; 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 [isCameraMode, setShowCamera] = useState(false); diff --git a/screens/camera/RegisterSalamanderScreen.js b/screens/camera/RegisterSalamanderScreen.js index c106d6a3b842d51947948f60ebf22cf02d945e6d..16291ce360b9b054eef7668ada4542ebb3905d63 100644 --- a/screens/camera/RegisterSalamanderScreen.js +++ b/screens/camera/RegisterSalamanderScreen.js @@ -36,6 +36,16 @@ const species = [ const sexValues = {firstValue:"female", secondValue:"male", thirdValue:"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 { salamanderSex, salamanderSpecies, image } = props.route.params; const { userReducer, updateLocations, addLastLocation } = props;