Skip to content

Commit 958802e

Browse files
authored

File tree

9 files changed

+317
-190
lines changed

9 files changed

+317
-190
lines changed

apps/explorer/src/components/recent-packages-card/RecentPackagesCard.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ const TRUNCATE_LENGTH = 16;
2323

2424
const columns = [
2525
{
26-
headerLabel: 'Time',
26+
header: 'Time',
2727
accessorKey: 'time',
2828
},
2929
{
30-
headerLabel: 'Package ID',
30+
header: 'Package ID',
3131
accessorKey: 'packageId',
3232
},
3333
{
34-
headerLabel: 'Transaction ID',
34+
header: 'Transaction ID',
3535
accessorKey: 'txnDigest',
3636
},
3737
{
38-
headerLabel: 'Sender',
38+
header: 'Sender',
3939
accessorKey: 'sender',
4040
},
4141
];

apps/explorer/src/components/top-validators-card/StakeColumn.tsx

+13-6
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,30 @@
33

44
import { SUI_TYPE_ARG } from '@mysten/sui.js';
55

6-
import { useFormatCoin } from '~/hooks/useFormatCoin';
6+
import { useFormatCoin, CoinFormat } from '~/hooks/useFormatCoin';
77
import { Text } from '~/ui/Text';
88

99
type StakeColumnProps = {
1010
stake: bigint | number | string;
11+
hideCoinSymbol?: boolean;
1112
};
1213

13-
export function StakeColumn({ stake }: StakeColumnProps) {
14-
const [amount, symbol] = useFormatCoin(stake, SUI_TYPE_ARG);
14+
export function StakeColumn({ stake, hideCoinSymbol }: StakeColumnProps) {
15+
const [amount, symbol] = useFormatCoin(
16+
stake,
17+
SUI_TYPE_ARG,
18+
hideCoinSymbol ? CoinFormat.FULL : CoinFormat.ROUNDED
19+
);
1520
return (
1621
<div className="flex items-end gap-0.5">
1722
<Text variant="bodySmall/medium" color="steel-darker">
1823
{amount}
1924
</Text>
20-
<Text variant="captionSmall/medium" color="steel-dark">
21-
{symbol}
22-
</Text>
25+
{!hideCoinSymbol && (
26+
<Text variant="captionSmall/medium" color="steel-dark">
27+
{symbol}
28+
</Text>
29+
)}
2330
</div>
2431
);
2532
}

apps/explorer/src/components/top-validators-card/TopValidatorsCard.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ const validatorsTable = (
8686
}),
8787
columns: [
8888
{
89-
headerLabel: 'Name',
89+
header: 'Name',
9090
accessorKey: 'name',
9191
},
9292
{
93-
headerLabel: 'Address',
93+
header: 'Address',
9494
accessorKey: 'address',
9595
},
9696
{
97-
headerLabel: 'Stake',
97+
header: 'Stake',
9898
accessorKey: 'stake',
9999
},
100100
],

apps/explorer/src/components/transaction-card/TxCardUtils.tsx

+6-8
Original file line numberDiff line numberDiff line change
@@ -141,31 +141,29 @@ export const genTableDataFromTxData = (
141141
})),
142142
columns: [
143143
{
144-
headerLabel: 'Time',
144+
header: 'Time',
145145
accessorKey: 'date',
146146
},
147147
{
148-
headerLabel: 'Type',
148+
header: 'Type',
149149
accessorKey: 'txTypes',
150150
},
151151
{
152-
headerLabel: () => (
152+
header: () => (
153153
<div className={styles.addresses}>Transaction ID</div>
154154
),
155155
accessorKey: 'transactionId',
156156
},
157157
{
158-
headerLabel: () => (
159-
<div className={styles.addresses}>Addresses</div>
160-
),
158+
header: () => <div className={styles.addresses}>Addresses</div>,
161159
accessorKey: 'addresses',
162160
},
163161
{
164-
headerLabel: 'Amount',
162+
header: 'Amount',
165163
accessorKey: 'amounts',
166164
},
167165
{
168-
headerLabel: 'Gas',
166+
header: 'Gas',
169167
accessorKey: 'gas',
170168
},
171169
],

0 commit comments

Comments
 (0)