diff --git a/screens/home/EditLocationScreen.js b/screens/home/EditLocationScreen.js index e590c9901ebd44c61ebed8cb20a07cc1933b5d4e..f6b9513c6605bc91298bd3622cc9ba4252f8fee0 100644 --- a/screens/home/EditLocationScreen.js +++ b/screens/home/EditLocationScreen.js @@ -24,6 +24,14 @@ import { } from "../../constants/inputRequirements"; import { toast500, toastError, toastSuccess } from "../../constants/toasts"; +/** + * This component renders the screen where a user can edit an existing location. The user can either edit the name, the radius or, if there + * are no salamanders at the given location, delete the location from the system. + * + * @param {*} props - used for redux, navigation and route to get data from the previous screen. + * + * @returns the component + */ const _EditLocationScreen = (props) => { const { locationId, locationName, locationRadius } = props.route.params; diff --git a/screens/home/HomeScreen.js b/screens/home/HomeScreen.js index 9c3c77f86d7da243369d8f902e00c017c413f452..a9616bf9008be429072936de48bef11eb7405e4f 100644 --- a/screens/home/HomeScreen.js +++ b/screens/home/HomeScreen.js @@ -8,6 +8,15 @@ import { connect } from "react-redux"; import { FAB } from "react-native-paper"; import CustomActivityIndicator from "../../components/CustomActivityIndicator"; +/** + * This component renders the home screen. This screen consists primarily of a map, and the user can either register a new location or edit an + * existing one from this screen. The user can also see all registered locations, and if they have given permission to the app to use their location, + * their current location will be shown on the map. + * + * @param {*} props - used for redux and navigation. + * + * @returns the component. + */ const _HomeScreen = (props) => { const { userReducer, updateLocations } = props; diff --git a/screens/home/RegisterLocationScreen.js b/screens/home/RegisterLocationScreen.js index 63708d9a269375bce3c17beaf4b80e1a6bf86e1e..1a19f09f7580936346e96cc46d86e296cca9709d 100644 --- a/screens/home/RegisterLocationScreen.js +++ b/screens/home/RegisterLocationScreen.js @@ -24,6 +24,14 @@ import { } from "../../constants/inputRequirements"; import { toast500, toastError, toastSuccess } from "../../constants/toasts"; +/** + * This component renders the screen where a user can register a new location. The user will have to provide a name and a radius for the + * new location. When the location is approved, the user will be taken back to the home screen. + * + * @param {*} props - used for redux, navigation and route to get data from the previous screen. + * + * @returns the component. + */ const _RegisterLocationScreen = (props) => { const { longitude, latitude } = props.route.params;