Better error messages on ItemSearchPage

Using that MajorErrorMessage, baby :) Helpful for debugging item search refactors lol
This commit is contained in:
Emi Matchu 2021-06-21 10:21:53 -07:00
parent 7d1872920c
commit 367a527a6f

View file

@ -11,7 +11,7 @@ import SearchToolbar, {
import SquareItemCard, { import SquareItemCard, {
SquareItemCardSkeleton, SquareItemCardSkeleton,
} from "./components/SquareItemCard"; } from "./components/SquareItemCard";
import { Delay, ErrorMessage, useCommonStyles, useDebounce } from "./util"; import { Delay, MajorErrorMessage, useCommonStyles, useDebounce } from "./util";
import PaginationToolbar from "./components/PaginationToolbar"; import PaginationToolbar from "./components/PaginationToolbar";
function ItemSearchPage() { function ItemSearchPage() {
@ -183,12 +183,7 @@ function ItemSearchPageResults({ query: latestQuery, offset }) {
} }
if (error) { if (error) {
return ( return <MajorErrorMessage error={error} variant="network" />;
<ErrorMessage>
Oops, we couldn't load the search results. Check your connection and try
again!
</ErrorMessage>
);
} }
if (data.itemSearch.items.length === 0) { if (data.itemSearch.items.length === 0) {