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 29
iWhatToWatch
Commits
18cdb3d4
Commit
18cdb3d4
authored
Nov 22, 2021
by
Dherik Jenitan Devakumar
Browse files
(
#15
) Fixed emtpy search on first try to not give no movies
parent
9a7009ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/sidebar/Search.tsx
View file @
18cdb3d4
...
...
@@ -13,7 +13,7 @@ const actionDispatch = (dispatch: Dispatch) => ({
});
const
SearchComp
:
FunctionComponent
=
()
=>
{
const
[
localSearch
,
setLocalSearch
]
=
useState
<
string
>
(
""
);
const
[
localSearch
,
setLocalSearch
]
=
useState
<
string
|
null
>
(
null
);
const
{
setSearch
}
=
actionDispatch
(
useAppDispatch
());
let
[
fontsLoaded
]
=
useFonts
({
'
Quicksand-Medium
'
:
require
(
'
../../assets/fonts/Quicksand-Medium.ttf
'
),
...
...
@@ -21,7 +21,7 @@ const SearchComp: FunctionComponent = () => {
})
const
searchEvent
=
()
=>
{
setSearch
(
localSearch
);
if
(
localSearch
!==
null
)
setSearch
(
localSearch
);
}
const
onChangeSearch
=
(
query
:
string
)
=>
setLocalSearch
(
query
);
...
...
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