Skip to content

Commit 0cb16a7

Browse files
authored
fix: block-overview page block status (#355)
1 parent bf3d804 commit 0cb16a7

File tree

5 files changed

+6
-27
lines changed

5 files changed

+6
-27
lines changed

services/explorer-ui/src/pages/landing/util.ts services/explorer-ui/src/lib/map-for-table.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
import {
2-
type ChicmozL2TxEffectDeluxe,
3-
type ChicmozL2BlockLight,
4-
} from "@chicmoz-pkg/types";
1+
import { type ChicmozL2BlockLight, type ChicmozL2TxEffectDeluxe } from "@chicmoz-pkg/types";
52
import { blockSchema } from "~/components/blocks/blocks-schema";
6-
import {
7-
getTxEffectTableObj,
8-
type TxEffectTableSchema,
9-
} from "~/components/tx-effects/tx-effects-schema";
3+
import { getTxEffectTableObj, type TxEffectTableSchema } from "~/components/tx-effects/tx-effects-schema";
104

115
export const mapLatestBlocks = (latestBlocks?: ChicmozL2BlockLight[]) => {
126
if (!latestBlocks) {

services/explorer-ui/src/pages/block/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import {
77
useLatestBlocks,
88
useSubTitle,
99
} from "~/hooks";
10+
import { mapLatestBlocks } from "~/lib/map-for-table";
1011
import { formatDuration } from "~/lib/utils";
1112
import { routes } from "~/routes/__root";
12-
import { parseLatestBlocks } from "./util";
1313

1414
export const Blocks: FC = () => {
1515
useSubTitle(routes.blocks.children.index.title);
@@ -51,7 +51,7 @@ export const Blocks: FC = () => {
5151
</div>
5252
<div className="rounded-lg shadow-lg">
5353
<BlocksTable
54-
blocks={parseLatestBlocks(latestBlocks)}
54+
blocks={mapLatestBlocks(latestBlocks)}
5555
isLoading={isLoading}
5656
error={error}
5757
/>

services/explorer-ui/src/pages/block/util.ts

-15
This file was deleted.

services/explorer-ui/src/pages/landing/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import {
1717
useTotalTxEffects,
1818
useTotalTxEffectsLast24h,
1919
} from "~/hooks";
20+
import { mapLatestBlocks, mapLatestTxEffects } from "~/lib/map-for-table";
2021
import { formatDuration, formatFees } from "~/lib/utils";
2122
import { routes } from "~/routes/__root";
22-
import { mapLatestBlocks, mapLatestTxEffects } from "./util";
2323

2424
export const Landing: FC = () => {
2525
const { systemHealth } = useSystemHealth();

services/explorer-ui/src/pages/tx-effect/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
useTotalTxEffects,
99
useTotalTxEffectsLast24h,
1010
} from "~/hooks";
11+
import { mapLatestTxEffects } from "~/lib/map-for-table";
1112
import { routes } from "~/routes/__root";
12-
import { mapLatestTxEffects } from "../landing/util";
1313

1414
export const TxEffects: FC = () => {
1515
useSubTitle(routes.txEffects.children.index.title);

0 commit comments

Comments
 (0)