diff --git a/redux/actions/action_setCardsList.tsx b/redux/actions/action_setCardsList.tsx index d89c3ae..708b5dd 100644 --- a/redux/actions/action_setCardsList.tsx +++ b/redux/actions/action_setCardsList.tsx @@ -5,7 +5,7 @@ import {Card} from '../../models/Card' export const setCardsList = (List: Card[]) => { return { - type: "FETCH_DATA", + type: FETCH_DATA, payload: List, }; } \ No newline at end of file diff --git a/screens/ListFav.tsx b/screens/ListFav.tsx index 1f96496..6e2768a 100644 --- a/screens/ListFav.tsx +++ b/screens/ListFav.tsx @@ -32,6 +32,9 @@ export default function ListScreen({navigation}){ const [searchValue, setSearchValue] = useState(''); + const filteredList = nList.filter(item => item.name.toLowerCase().includes(searchValue.toLowerCase())); + + return ( @@ -44,7 +47,7 @@ export default function ListScreen({navigation}){ navigation.navigate("ListFav")}>