Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IT2810 H21
Team 05
prosjekt4
Commits
fcb6aa26
Commit
fcb6aa26
authored
Nov 19, 2021
by
Peter Skaar Nordby
Browse files
Merge branch '22-fiks-av-sma-bugs' into 'master'
Resolve "Fiks av små bugs" Closes
#22
See merge request
!21
parents
d0ef0159
91b3a6de
Changes
6
Hide whitespace changes
Inline
Side-by-side
components/MovieInfo.tsx
View file @
fcb6aa26
...
@@ -286,16 +286,13 @@ export default function MovieInfo({ movieID }: MovieInfoProps) {
...
@@ -286,16 +286,13 @@ export default function MovieInfo({ movieID }: MovieInfoProps) {
<
Seperator
marginVertical
=
{
10
}
curved
/>
<
Seperator
marginVertical
=
{
10
}
curved
/>
<
View
style
=
{
{
width
:
'
100%
'
}
}
>
<
View
style
=
{
{
width
:
'
100%
'
}
}
>
{
LabelAndText
(
'
DIRECTORS
'
,
'
Joshua King
'
)
}
{
LabelAndText
(
'
DIRECTORS
'
,
data
.
movie
.
directors
.
join
(
'
,
'
)
)
}
<
Seperator
marginVertical
=
{
10
}
curved
/>
<
Seperator
marginVertical
=
{
10
}
curved
/>
{
LabelAndText
(
'
PRODUCTION
'
,
'
Paramount Pictures, W365
'
)
}
{
LabelAndText
(
'
PRODUCTION
'
,
data
.
movie
.
production
.
join
(
'
,
'
)
)
}
<
Seperator
marginVertical
=
{
10
}
curved
/>
<
Seperator
marginVertical
=
{
10
}
curved
/>
{
LabelAndText
(
'
WRITERS
'
,
'
Phil Hay, Matt Manfredi, Peter Chung
'
)
}
{
LabelAndText
(
'
WRITERS
'
,
data
.
movie
.
writers
.
join
(
'
,
'
)
)
}
<
Seperator
marginVertical
=
{
10
}
curved
/>
<
Seperator
marginVertical
=
{
10
}
curved
/>
{
LabelAndText
(
{
LabelAndText
(
'
STARRING ACTORS
'
,
data
.
movie
.
actors
.
join
(
'
,
'
))
}
'
STARRING ACTORS
'
,
'
Charlize Theron, Frances McDormand, Sophie Okonedo
'
,
)
}
<
Seperator
marginVertical
=
{
10
}
curved
/>
<
Seperator
marginVertical
=
{
10
}
curved
/>
</
View
>
</
View
>
...
...
components/ProfileInfo.tsx
View file @
fcb6aa26
...
@@ -11,16 +11,16 @@ export default function ProfileInfo({ user }: { user: UserEntity }) {
...
@@ -11,16 +11,16 @@ export default function ProfileInfo({ user }: { user: UserEntity }) {
<
View
style
=
{
styles
.
profileInfoContainer
}
>
<
View
style
=
{
styles
.
profileInfoContainer
}
>
<
Text
<
Text
style
=
{
styles
.
profileInfoText
}
style
=
{
styles
.
profileInfoText
}
lightColor
=
'rgba(0,0,0,0.
8
)'
lightColor
=
'rgba(0,0,0,0.
9
)'
darkColor
=
'rgba(255,255,255,0.
8
)'
darkColor
=
'rgba(255,255,255,0.
9
)'
>
>
{
user
.
username
}
{
user
.
username
}
</
Text
>
</
Text
>
<
Text
<
Text
style
=
{
styles
.
profileInfoText
}
style
=
{
styles
.
profileInfoText
}
lightColor
=
'rgba(0,0,0,0.
5
)'
lightColor
=
'rgba(0,0,0,0.
7
)'
darkColor
=
'rgba(255,255,255,0.
5
)'
darkColor
=
'rgba(255,255,255,0.
7
)'
>
>
{
user
.
email
}
{
user
.
email
}
</
Text
>
</
Text
>
...
...
components/RatingModal.tsx
View file @
fcb6aa26
...
@@ -42,11 +42,13 @@ const RatingModal: React.FC<RatingModalProps> = ({
...
@@ -42,11 +42,13 @@ const RatingModal: React.FC<RatingModalProps> = ({
{
{
backgroundColor
:
useThemeColor
({},
'
background
'
),
backgroundColor
:
useThemeColor
({},
'
background
'
),
borderColor
:
useThemeColor
({},
'
border
'
),
borderColor
:
useThemeColor
({},
'
border
'
),
color
:
useThemeColor
({},
'
inputText
'
),
},
},
]
}
]
}
value
=
{
ratingText
}
value
=
{
ratingText
}
onChangeText
=
{
setRatingText
}
onChangeText
=
{
setRatingText
}
placeholder
=
'Write your rating here...'
placeholder
=
'Write your rating here...'
placeholderTextColor
=
{
useThemeColor
({},
'
inputText
'
)
}
multiline
multiline
numberOfLines
=
{
4
}
numberOfLines
=
{
4
}
></
TextInput
>
></
TextInput
>
...
...
components/common/SearchInput.tsx
View file @
fcb6aa26
...
@@ -25,6 +25,7 @@ const SearchInput: React.FC<IProps> = (props: IProps) => {
...
@@ -25,6 +25,7 @@ const SearchInput: React.FC<IProps> = (props: IProps) => {
},
},
]
}
]
}
placeholder
=
{
props
.
placeholder
}
placeholder
=
{
props
.
placeholder
}
placeholderTextColor
=
{
useThemeColor
({},
'
inputText
'
)
}
onChangeText
=
{
handleChange
}
onChangeText
=
{
handleChange
}
/>
/>
);
);
...
...
screens/Profile.tsx
View file @
fcb6aa26
import
*
as
React
from
'
react
'
;
import
*
as
React
from
'
react
'
;
import
{
useEffect
}
from
'
react
'
;
import
{
StyleSheet
}
from
'
react-native
'
;
import
{
StyleSheet
}
from
'
react-native
'
;
import
{
useDispatch
,
useSelector
}
from
'
react-redux
'
;
import
{
useSelector
}
from
'
react-redux
'
;
import
{
useThemeColor
,
View
}
from
'
../components/common/Themed
'
;
import
{
useThemeColor
,
View
}
from
'
../components/common/Themed
'
;
import
Login
from
'
../components/LoginComponent
'
;
import
Login
from
'
../components/LoginComponent
'
;
import
ProfileInfo
from
'
../components/ProfileInfo
'
;
import
ProfileInfo
from
'
../components/ProfileInfo
'
;
import
UserRatings
from
'
../components/UserRatings
'
;
import
UserRatings
from
'
../components/UserRatings
'
;
import
{
setToken
}
from
'
../store/ducks/auth/actions
'
;
import
{
AuthState
}
from
'
../store/ducks/auth/types
'
;
import
{
AuthState
}
from
'
../store/ducks/auth/types
'
;
import
{
ApplicationState
}
from
'
../store/interface
'
;
import
{
ApplicationState
}
from
'
../store/interface
'
;
import
{
RootStackScreenProps
}
from
'
../types
'
;
export
default
function
Profile
(
{
navigation
}:
RootStackScreenProps
<
'
Profile
'
>
):
JSX
.
Element
{
export
default
function
Profile
():
JSX
.
Element
{
const
auth
:
AuthState
=
useSelector
(({
auth
}:
ApplicationState
)
=>
auth
);
const
auth
:
AuthState
=
useSelector
(({
auth
}:
ApplicationState
)
=>
auth
);
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
...
@@ -21,7 +18,7 @@ export default function Profile({ navigation }: RootStackScreenProps<'Profile'>)
...
@@ -21,7 +18,7 @@ export default function Profile({ navigation }: RootStackScreenProps<'Profile'>)
justifyContent
:
'
center
'
,
justifyContent
:
'
center
'
,
},
},
topInfo
:
{
topInfo
:
{
backgroundColor
:
useThemeColor
({},
'
comp
on
ent
'
),
backgroundColor
:
useThemeColor
({},
'
comp
lem
ent
'
),
width
:
'
100%
'
,
width
:
'
100%
'
,
},
},
title
:
{
title
:
{
...
...
store/ducks/movies/types.ts
View file @
fcb6aa26
...
@@ -90,7 +90,7 @@ export const initialQuery: FetchMovieParams = {
...
@@ -90,7 +90,7 @@ export const initialQuery: FetchMovieParams = {
perPage
:
20
,
perPage
:
20
,
page
:
0
,
page
:
0
,
orderBy
:
"
title
"
,
orderBy
:
"
title
"
,
order
:
"
de
sc
"
,
order
:
"
a
sc
"
,
filters
:
{
filters
:
{
title
:
""
,
title
:
""
,
actors
:
[],
actors
:
[],
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment