add error notice component to resource page

This commit is contained in:
Brandon Egger
2023-08-24 10:13:05 -05:00
parent 9163b13e92
commit d7f5fae14a
2 changed files with 38 additions and 19 deletions

View File

@ -35,12 +35,17 @@ const Resources = () => {
if (resourceQuery.isLoading) {
return <LoadingBarChart width={200} height={200} />;
}
if (!resourceQuery.data || resourceQuery.isError) {
return <div className="my-28">
<ErrorNotice icon header="Unable to pull available resources. Please try again."
body="If this issue persists, please contact a site administrator" />
return (
<div className="my-28">
<ErrorNotice
icon
header="Unable to pull available resources. Please try again."
body="If this issue persists, please contact a site administrator"
/>
</div>
);
}
const totalPages = Math.ceil(resourceQuery.data.count / queryData.perPage);