Commit 18cdb3d4 authored by Dherik Jenitan Devakumar's avatar Dherik Jenitan Devakumar
Browse files

(#15) Fixed emtpy search on first try to not give no movies

parent 9a7009ba
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment