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
Commits
ac57faca
Commit
ac57faca
authored
4 years ago
by
Jørgen Rosager
Browse files
Options
Downloads
Patches
Plain Diff
change to proper action
parent
79f038e2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
studentbyer/components/StudentCityCards/StudentCityCard.tsx
+6
-3
6 additions, 3 deletions
studentbyer/components/StudentCityCards/StudentCityCard.tsx
with
6 additions
and
3 deletions
studentbyer/components/StudentCityCards/StudentCityCard.tsx
+
6
−
3
View file @
ac57faca
...
@@ -3,7 +3,10 @@ import { StudentCity } from "../../store/studentCity/interfaces";
...
@@ -3,7 +3,10 @@ import { StudentCity } from "../../store/studentCity/interfaces";
import
{
Text
,
View
}
from
"
../Themed
"
;
import
{
Text
,
View
}
from
"
../Themed
"
;
import
{
Badge
}
from
"
react-native-elements
"
;
import
{
Badge
}
from
"
react-native-elements
"
;
import
{
useActions
}
from
"
../../hooks/useActions
"
;
import
{
useActions
}
from
"
../../hooks/useActions
"
;
import
{
setStudentCity
}
from
"
../../store/studentCity/actions
"
;
import
{
fetchStudentCity
,
setStudentCity
,
}
from
"
../../store/studentCity/actions
"
;
import
{
TouchableOpacity
}
from
"
react-native-gesture-handler
"
;
import
{
TouchableOpacity
}
from
"
react-native-gesture-handler
"
;
import
Rating
from
"
../Rating
"
;
import
Rating
from
"
../Rating
"
;
import
StarRating
from
"
../Rating/StarRating
"
;
import
StarRating
from
"
../Rating/StarRating
"
;
...
@@ -17,13 +20,13 @@ type Props = {
...
@@ -17,13 +20,13 @@ type Props = {
* Component for showing data for one student city given as a prop.
* Component for showing data for one student city given as a prop.
*/
*/
const
StudentCityCard
=
({
studentCity
,
navigation
}:
Props
)
=>
{
const
StudentCityCard
=
({
studentCity
,
navigation
}:
Props
)
=>
{
const
actions
=
useActions
({
s
etStudentCity
});
const
actions
=
useActions
({
f
et
ch
StudentCity
});
return
(
return
(
<
TouchableOpacity
<
TouchableOpacity
key
=
{
studentCity
.
id
}
key
=
{
studentCity
.
id
}
onPress
=
{
()
=>
{
onPress
=
{
()
=>
{
actions
.
s
etStudentCity
(
studentCity
);
// don't need to fetch again here
actions
.
f
et
ch
StudentCity
(
studentCity
.
id
);
// don't need to fetch again here
navigation
.
navigate
(
"
StudentCity
"
);
navigation
.
navigate
(
"
StudentCity
"
);
}
}
}
}
>
>
...
...
This diff is collapsed.
Click to expand it.
Jørgen Rosager
@jorgro
mentioned in commit
9abe766d
·
4 years ago
mentioned in commit
9abe766d
mentioned in commit 9abe766d93e0ca9a86acd486a19262d1b89f93d3
Toggle commit list
Jørgen Rosager
@jorgro
mentioned in merge request
!15 (merged)
·
4 years ago
mentioned in merge request
!15 (merged)
mentioned in merge request !15
Toggle commit list
Jørgen Rosager
@jorgro
mentioned in commit
e8379088
·
4 years ago
mentioned in commit
e8379088
mentioned in commit e837908858dcdd9a257013d67a449893c9b28ecb
Toggle commit list
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