Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Salamander - APP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eirik Martin Danielsen
Salamander - APP
Commits
bb1b9232
Commit
bb1b9232
authored
3 years ago
by
Andrea Magnussen
Browse files
Options
Downloads
Patches
Plain Diff
Documented the home screens
parent
cd071963
Branches
Branches containing commit
No related tags found
1 merge request
!70
Resolve "Add comments to all files"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
screens/home/EditLocationScreen.js
+8
-0
8 additions, 0 deletions
screens/home/EditLocationScreen.js
screens/home/HomeScreen.js
+9
-0
9 additions, 0 deletions
screens/home/HomeScreen.js
screens/home/RegisterLocationScreen.js
+8
-0
8 additions, 0 deletions
screens/home/RegisterLocationScreen.js
with
25 additions
and
0 deletions
screens/home/EditLocationScreen.js
+
8
−
0
View file @
bb1b9232
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
screens/home/HomeScreen.js
+
9
−
0
View file @
bb1b9232
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
screens/home/RegisterLocationScreen.js
+
8
−
0
View file @
bb1b9232
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment