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 H20
Team Ad Hoc
4-t-h
Commits
28b902e0
Commit
28b902e0
authored
Nov 12, 2020
by
Thor-Herman
Browse files
Downgrade router version
Caused a whole lot of bugs
parent
da7491d9
Changes
5
Hide whitespace changes
Inline
Side-by-side
prosjekt-4/components/App.tsx
View file @
28b902e0
...
...
@@ -24,11 +24,8 @@ const App = () => {
return
(
<
Container
>
<
Header
/>
<
Switch
>
<
Route
exact
path
=
'/'
component
=
{
BrowsePage
}
/>
<
Route
path
=
'/movie/:movieId'
component
=
{
MoviePage
}
/>
</
Switch
>
<
Footer
/>
<
Route
exact
path
=
'/'
component
=
{
BrowsePage
}
/>
<
Route
path
=
'/movie/:movieId'
component
=
{
MoviePage
}
/>
</
Container
>
);
};
...
...
prosjekt-4/components/SearchBar.tsx
View file @
28b902e0
...
...
@@ -2,14 +2,13 @@ import { Container, Icon, Input, Item, View } from 'native-base';
import
React
,
{
Props
,
useEffect
}
from
'
react
'
;
import
{
NativeSyntheticEvent
,
TextInputChangeEventData
,
TextInputSubmitEditingEventData
}
from
'
react-native
'
;
import
{
useDispatch
,
useSelector
}
from
'
react-redux
'
;
import
{
Link
}
from
'
react-router-native
'
;
import
{
useHistory
}
from
'
react-router-native
'
;
import
{
searchMovieTitles
,
searchMovies
}
from
'
../actions
'
;
import
{
RootState
}
from
'
../reducers
'
;
import
history
from
'
../history
'
;
const
SearchBar
=
()
=>
{
const
dispatch
=
useDispatch
();
const
history
=
useHistory
();
const
handleChange
=
(
e
:
NativeSyntheticEvent
<
TextInputChangeEventData
>
):
void
=>
{
e
.
preventDefault
();
...
...
prosjekt-4/index.js
View file @
28b902e0
...
...
@@ -3,17 +3,16 @@ import createStore from './store';
import
App
from
'
./components/App
'
;
import
React
from
'
react
'
;
import
{
Provider
}
from
'
react-redux
'
;
import
history
from
'
./history
'
;
import
{
Router
}
from
'
react-router
'
;
import
{
NativeRouter
}
from
'
react-router-native
'
;
const
store
=
createStore
();
const
ReduxApp
=
()
=>
{
return
(
<
Provider
store
=
{
store
}
>
<
Router
history
=
{
history
}
>
<
Native
Router
>
<
App
/>
<
/Router
>
<
/
Native
Router
>
<
/Provider
>
);
};
...
...
prosjekt-4/package.json
View file @
28b902e0
...
...
@@ -32,7 +32,7 @@
"react-native-web"
:
"~0.13.12"
,
"react-redux"
:
"^7.2.2"
,
"react-router"
:
"^5.2.0"
,
"react-router-native"
:
"
^
5.
2
.0"
,
"react-router-native"
:
"5.
1
.0"
,
"redux"
:
"^4.0.5"
,
"redux-devtools-extension"
:
"^2.13.8"
,
"redux-thunk"
:
"^2.3.0"
,
...
...
prosjekt-4/yarn.lock
View file @
28b902e0
...
...
@@ -6153,6 +6153,14 @@ min-document@^2.19.0:
dependencies:
dom-walk "^0.1.0"
mini-create-react-context@^0.3.0:
version "0.3.3"
resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.3.3.tgz#b1b2bc6604d3a6c5d9752bad7692615410ebb38e"
integrity sha512-TtF6hZE59SGmS4U8529qB+jJFeW6asTLDIpPgvPLSCsooAwJS7QprHIFTqv9/Qh3NdLwQxFYgiHX5lqb6jqzPA==
dependencies:
"@babel/runtime" "^7.12.1"
tiny-warning "^1.0.3"
mini-create-react-context@^0.4.0:
version "0.4.1"
resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz#072171561bfdc922da08a60c2197a497cc2d1d5e"
...
...
@@ -7117,15 +7125,31 @@ react-refresh@^0.4.0:
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.3.tgz#966f1750c191672e76e16c2efa569150cc73ab53"
integrity sha512-Hwln1VNuGl/6bVwnd0Xdn1e84gT/8T9aYNL+HAKDArLCS7LWjwr7StE30IEYbIkx0Vi3vs+coQxe+SQDbGbbpA==
react-router-native@
^
5.
2
.0:
version "5.
2
.0"
resolved "https://registry.yarnpkg.com/react-router-native/-/react-router-native-5.
2
.0.tgz#
40c40856a8d1e3b189c7ad5c1be9b1ead4dbacfd
"
integrity sha512-
4J9htwyEDpE8mmuZ3vlgsxUd79BU/R64PqMQoXbZU/QM7gaB1O3EEY9MRryidxDmSy+rrTvVe4PjAzGRV0bFF
g==
react-router-native@5.
1
.0:
version "5.
1
.0"
resolved "https://registry.yarnpkg.com/react-router-native/-/react-router-native-5.
1
.0.tgz#
fc5fd24ddf6d39413731bde3392ee2cd962b49ce
"
integrity sha512-
dePaODlETaGWDE5izPcTeVej4ueT/69uZPLnq1Yol4BXwlwvjgftVAdS7bpnUlP7XEcbTaQJ1zeFd9VelG8mf
g==
dependencies:
prop-types "^15.6.1"
react-router "5.2.0"
react-router "5.1.0"
react-router@5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.1.0.tgz#739d0f3a57476363374e20d6e33e97f5ce2e00a3"
integrity sha512-n9HXxaL/6yRlig9XPfGyagI8+bUNdqcu7FUAx0/Z+Us22Z8iHsbkyJ21Inebn9HOxI5Nxlfc8GNabkNSeXfhqw==
dependencies:
"@babel/runtime" "^7.1.2"
history "^4.9.0"
hoist-non-react-statics "^3.1.0"
loose-envify "^1.3.1"
mini-create-react-context "^0.3.0"
path-to-regexp "^1.7.0"
prop-types "^15.6.2"
react-is "^16.6.0"
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"
react-router@5.2.0,
react-router@^5.2.0:
react-router@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.0.tgz#424e75641ca8747fbf76e5ecca69781aa37ea293"
integrity sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==
...
...
Thor-Herman Van Eggelen
@theggele
mentioned in commit
504590b8
·
Nov 12, 2020
mentioned in commit
504590b8
mentioned in commit 504590b84bbf2f9a5914db30a5abe4cab29ee3a5
Toggle commit list
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