Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Prosjekt 4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
JogJ
Prosjekt 4
Merge requests
!15
Revert "change to proper action"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Revert "change to proper action"
revert-ac57faca
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Jørgen Rosager
requested to merge
revert-ac57faca
into
master
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
This reverts commit
ac57faca
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
9abe766d
1 commit,
4 years ago
1 file
+
3
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
studentbyer/components/StudentCityCards/StudentCityCard.tsx
+
3
−
6
Options
@@ -3,10 +3,7 @@ import { StudentCity } from "../../store/studentCity/interfaces";
import
{
Text
,
View
}
from
"
../Themed
"
;
import
{
Badge
}
from
"
react-native-elements
"
;
import
{
useActions
}
from
"
../../hooks/useActions
"
;
import
{
fetchStudentCity
,
setStudentCity
,
}
from
"
../../store/studentCity/actions
"
;
import
{
setStudentCity
}
from
"
../../store/studentCity/actions
"
;
import
{
TouchableOpacity
}
from
"
react-native-gesture-handler
"
;
import
Rating
from
"
../Rating
"
;
import
StarRating
from
"
../Rating/StarRating
"
;
@@ -20,13 +17,13 @@ type Props = {
* Component for showing data for one student city given as a prop.
*/
const
StudentCityCard
=
({
studentCity
,
navigation
}:
Props
)
=>
{
const
actions
=
useActions
({
f
et
ch
StudentCity
});
const
actions
=
useActions
({
s
etStudentCity
});
return
(
<
TouchableOpacity
key
=
{
studentCity
.
id
}
onPress
=
{
()
=>
{
actions
.
f
et
ch
StudentCity
(
studentCity
.
id
);
// don't need to fetch again here
actions
.
s
etStudentCity
(
studentCity
);
// don't need to fetch again here
navigation
.
navigate
(
"
StudentCity
"
);
}
}
>
Loading