Better error messages on ItemSearchPage
Using that MajorErrorMessage, baby :) Helpful for debugging item search refactors lol
This commit is contained in:
parent
7d1872920c
commit
367a527a6f
1 changed files with 2 additions and 7 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue