Skip to content

Commit

Permalink
refactor: add loading spinner to blob details page
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-herasme committed Sep 12, 2024
1 parent 819ced4 commit 02e39b7
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions apps/web/src/pages/blob/[hash].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { Link } from "~/components/Link";
import { NavArrows } from "~/components/NavArrows";
import { BlockStatus } from "~/components/Status";
import { api } from "~/api-client";
import Loading from "~/icons/loading.svg";
import type { Rollup } from "~/types";
import {
buildBlockRoute,
Expand Down Expand Up @@ -177,16 +178,20 @@ const Blob: NextPage = function () {
header={
<div className="flex items-center justify-start gap-4">
Blob Details
<NavArrows
prev={{
href: neighbors?.prev ? `/blob/${neighbors.prev}` : undefined,
tooltip: "Previous blob from this sender",
}}
next={{
href: neighbors?.next ? `/blob/${neighbors.next}` : undefined,
tooltip: "Next blob from this sender",
}}
/>
{neighbors ? (
<NavArrows
prev={{
href: neighbors?.prev ? `/blob/${neighbors.prev}` : undefined,
tooltip: "Previous blob from this sender",
}}
next={{
href: neighbors?.next ? `/blob/${neighbors.next}` : undefined,
tooltip: "Next blob from this sender",
}}
/>
) : (
<Loading className="h-5 w-5 animate-spin" />
)}
</div>
}
fields={blob ? detailsFields : undefined}
Expand Down

0 comments on commit 02e39b7

Please sign in to comment.