diff --git a/frontend/package.json b/frontend/package.json index 983c93f..7ad0d1b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name" : "brewmymac-frontend", "description" : "Possibly the coolest way to install apps and customize your Mac!", - "version" : "1.1.4", + "version" : "1.1.3", "author" : { "name" : "Alan Tai" }, diff --git a/frontend/src/components/FilteredItemGrid.tsx b/frontend/src/components/FilteredItemGrid.tsx index ecaac96..a47b78a 100644 --- a/frontend/src/components/FilteredItemGrid.tsx +++ b/frontend/src/components/FilteredItemGrid.tsx @@ -111,39 +111,7 @@ export const FilteredItemGrid = ({ setFilteredItems(search()); } - }, [ filter, selectedOnly, ]); - - useEffect(() => { - if (formulaStatus === QueryStatus.fulfilled && formulaData) { - searchEngine.current.addAll(formulaData); - - if (filter.length >= MIN_SEARCH_LENGTH) setFilteredItems(search()); - } - }, [ formulaData, formulaStatus, ]); - - useEffect(() => { - if (caskStatus === QueryStatus.fulfilled && caskData) { - searchEngine.current.addAll(caskData); - - if (filter.length >= MIN_SEARCH_LENGTH) setFilteredItems(search()); - } - }, [ caskData, caskStatus, ]); - - useEffect(() => { - if (searchStatus === QueryStatus.fulfilled && searchData) { - searchEngine.current.addAll(searchData); - - if (filter.length >= MIN_SEARCH_LENGTH) setFilteredItems(search()); - } - }, [ searchData, searchStatus, ]); - - useEffect(() => { - if (tweakStatus === QueryStatus.fulfilled && tweakData) { - searchEngine.current.addAll(tweakData); - - if (filter.length >= MIN_SEARCH_LENGTH) setFilteredItems(search()); - } - }, [ tweakData, tweakStatus, ]); + }, [ caskData, filter, formulaData, searchData, selectedOnly, tweakData, ]); useEffect(() => { if (onStatusChange) return onStatusChange(formulaStatus === QueryStatus.pending || caskStatus === QueryStatus.pending || searchStatus === QueryStatus.pending || tweakStatus === QueryStatus.pending);