Skip to content

Commit

Permalink
feat: show block number and cancel number of link
Browse files Browse the repository at this point in the history
  • Loading branch information
fearlessfe committed Oct 13, 2024
1 parent 6ac42c8 commit bebe3f9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/components/Cards/SurfaceCards/ClaimCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const ClaimCard: FC<Partial<ClaimCardProps>> = ({
{output_block ? (
<div className="flex gap-1 text-contentSecondary-light dark:text-contentSecondary-dark">
Block{" "}
<Link href={`${EXPLORER_L2}/block/${output_block}`} isExternal>
{output_block}
</Link>
{/* <Link href={`${EXPLORER_L2}/block/${output_block}`} isExternal> */}
{output_block}
{/* </Link> */}
</div>
) : (
<Skeleton width={150} />
Expand Down
15 changes: 5 additions & 10 deletions src/components/Cards/SurfaceCards/GameCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,23 @@ const GameCard: FC<Partial<GameCardProps>> = function ({
game_contract,
status,
tx_hash,
claim_data_len
claim_data_len,
} = {},
}) {
const { explorer_l1: EXPLORER_L1, explorer_l2: EXPLORER_L2 } =
useContext(NetworkConfigContext);
return (
<SurfaceCardBase>
<div className="flex justify-between gap-2 text-sm">
{/* <div className="flex gap-2 md:flex-row">
<div className="flex gap-2 md:flex-row">
{number ? (
<div className="flex gap-1 text-contentSecondary-light dark:text-contentSecondary-dark">
Block{" "}
<Link href={`${EXPLORER_L2}/block/${number}`} isExternal>
{number}
</Link>
Block {number}
</div>
) : (
<Skeleton width={150} />
)}
</div> */}
</div>
{block_time ? (
<div className="text-xs italic text-contentSecondary-light dark:text-contentSecondary-dark">
{dayjs(block_time * 1000).fromNow()}
Expand Down Expand Up @@ -91,9 +88,7 @@ const GameCard: FC<Partial<GameCardProps>> = function ({
<span className="text-contentTertiary-light dark:text-contentTertiary-dark">
claim data length{" "}
</span>
<span>
{claim_data_len}
</span>
<span>{claim_data_len}</span>
</div>
) : (
<Skeleton width={170} size="xs" />
Expand Down
12 changes: 6 additions & 6 deletions src/pages/game/[game].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ const GameDetail = () => {
<GameItemCard
name="Disputed L2 Block"
content={
<Link
href={`${EXPLORER_L2}/block/${game?.hits[0].l2_block_number.toString()}`}
isExternal
>
{game?.hits[0].l2_block_number.toString()}
</Link>
// <Link
// href={`${EXPLORER_L2}/block/${game?.hits[0].l2_block_number.toString()}`}
// isExternal
// >
game?.hits[0].l2_block_number.toString()
// </Link>
}
/>
</div>
Expand Down

0 comments on commit bebe3f9

Please sign in to comment.