diff --git a/src/frontend/src/pages/StorePage/index.tsx b/src/frontend/src/pages/StorePage/index.tsx index 304a025a0..b6c465716 100644 --- a/src/frontend/src/pages/StorePage/index.tsx +++ b/src/frontend/src/pages/StorePage/index.tsx @@ -84,7 +84,11 @@ export default function StorePage(): JSX.Element { .then((res) => { setLoading(false); setSearchData(res?.results ?? []); - setTotalRowsCount(Number(res?.count ?? 0)); + setTotalRowsCount( + filteredCategories?.length === 0 + ? Number(res?.count ?? 0) + : res?.results?.length ?? 0 + ); }) .catch((err) => { setSearchData([]); @@ -291,7 +295,7 @@ export default function StorePage(): JSX.Element { - {(!loading || searchData.length !== 0) && ( + {!loading && searchData.length !== 0 && (