Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/common/table-columns/BLOCK_COLUMNS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const BLOCK_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
className="font-mono text-flare"
numeric
/>
),
enableSorting: false
Expand All @@ -44,15 +44,15 @@ export const BLOCK_COLUMNS = [
id: 'extrinsicsCount',
header: 'Txs',
cell: (props) => (
<span className="font-mono text-muted-text">{props.getValue()}</span>
<span className="numeric text-muted-text">{props.getValue()}</span>
),
enableSorting: true
}),
columnHelper.accessor('reward', {
id: 'reward',
header: 'Reward',
cell: (props) => (
<span className="font-mono">{formatMonetaryValue(props.getValue())}</span>
<span className="numeric">{formatMonetaryValue(props.getValue())}</span>
),
enableSorting: true
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const ERROR_EVENT_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const HIGH_SECURITY_SET_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const getMinerLeaderboardColumns = ({
return (
<div
className={cn(
'w-8 font-mono text-xs text-center',
'w-8 numeric text-xs text-center',
getRankClassName(rank)
)}
>
Expand Down Expand Up @@ -84,7 +84,7 @@ export const getMinerLeaderboardColumns = ({
id: 'total_mined_blocks',
header: 'Blocks Mined',
cell: (props) => (
<span className="font-mono">
<span className="numeric">
{(props.getValue() ?? 0).toLocaleString()}
</span>
),
Expand Down Expand Up @@ -112,7 +112,7 @@ export const getMinerLeaderboardColumns = ({
}}
/>
</div>
<span className="font-mono text-muted-text">{pct.toFixed(1)}%</span>
<span className="numeric text-muted-text">{pct.toFixed(1)}%</span>
</div>
);
},
Expand All @@ -122,7 +122,7 @@ export const getMinerLeaderboardColumns = ({
id: 'total_rewards',
header: 'Total Rewards',
cell: (props) => (
<span className="font-mono">
<span className="numeric">
{formatMonetaryValue(props.getValue(), 5)}
</span>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const MINER_REWARD_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const MULTISIG_CREATED_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const MULTISIG_DEPOSITS_CLAIMED_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const MULTISIG_PROPOSAL_CANCELLED_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export const MULTISIG_PROPOSAL_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const MULTISIG_PROPOSAL_CREATED_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const MULTISIG_PROPOSAL_EXECUTED_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const MULTISIG_PROPOSAL_READY_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const MULTISIG_PROPOSAL_REMOVED_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const MULTISIG_SIGNER_APPROVED_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const RECENT_BLOCK_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const TRANSACTION_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
numeric
/>
),
enableSorting: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const UNIFIED_LIST_TRANSACTION_COLUMNS = [
<LinkWithCopy
href={`${RESOURCES.blocks}/${props.getValue()}`}
text={formatBlockHeight(props.getValue())}
className="font-mono text-flare"
numeric
/>
),
enableSorting: true
Expand Down Expand Up @@ -112,7 +112,7 @@ export const UNIFIED_LIST_TRANSACTION_COLUMNS = [
const value = props.getValue();
if (value == null)
return <span className="font-mono text-muted-text">—</span>;
return <span className="font-mono">{formatMonetaryValue(value, 5)}</span>;
return <span className="numeric">{formatMonetaryValue(value, 5)}</span>;
},
enableSorting: true
}),
Expand All @@ -124,7 +124,7 @@ export const UNIFIED_LIST_TRANSACTION_COLUMNS = [
if (value == null)
return <span className="font-mono text-muted-text">—</span>;
return (
<span className="font-mono text-muted-text">
<span className="numeric text-muted-text">
{formatMonetaryValue(value, 5)}
</span>
);
Expand Down Expand Up @@ -212,7 +212,7 @@ export const RECENT_UNIFIED_LIST_TRANSACTION_COLUMNS = [
const value = props.getValue();
if (value == null)
return <span className="font-mono text-muted-text">—</span>;
return <span className="font-mono">{formatMonetaryValue(value, 5)}</span>;
return <span className="numeric">{formatMonetaryValue(value, 5)}</span>;
},
enableSorting: false
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const AccountInformation: React.FC<AccountInformationProps> = ({
label: 'Free Balance',
key: 'free',
render: (value) => (
<span className="font-mono text-base text-flare">
<span className="numeric text-base text-flare">
{formatMonetaryValue(value)}
</span>
),
Expand All @@ -156,14 +156,14 @@ export const AccountInformation: React.FC<AccountInformationProps> = ({
label: 'Transactions',
key: 'transactions',
render: (value) => (
<span className="font-mono">{value.toLocaleString()}</span>
<span className="numeric">{value.toLocaleString()}</span>
)
},
{
label: 'Mining Rewards',
key: 'miningRewards',
render: (value) => (
<span className="font-mono">
<span className="numeric">
{value > 1 ? `${value} rewards` : `${value} reward`}
</span>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ export const AccountsStats: React.FC<AccountsStatsProps> = () => {
</CardTitle>
</CardHeader>
<CardContent>
{success && (
<p className="font-mono">
{data?.all.total_accounts.toLocaleString()}
</p>
)}
{success && <p>{data?.all.total_accounts.toLocaleString()}</p>}
{loading && <Skeleton className="h-6" />}
{error && <InlineFetchError error={error} />}
</CardContent>
Expand All @@ -59,9 +55,7 @@ export const AccountsStats: React.FC<AccountsStatsProps> = () => {
</CardHeader>
<CardContent>
{success && (
<p className="font-mono">
{data?.recentlyActive.aggregate.count.toLocaleString()}
</p>
<p>{data?.recentlyActive.aggregate.count.toLocaleString()}</p>
)}
{loading && <Skeleton className="h-6" />}
{error && <InlineFetchError error={error} />}
Expand All @@ -76,9 +70,7 @@ export const AccountsStats: React.FC<AccountsStatsProps> = () => {
</CardHeader>
<CardContent>
{success && (
<p className="font-mono">
{data?.recentlyDeposited.aggregate.count.toLocaleString()}
</p>
<p>{data?.recentlyDeposited.aggregate.count.toLocaleString()}</p>
)}
{loading && <Skeleton className="h-6" />}
{error && <InlineFetchError error={error} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function splitRewardTransfers(

function formatRewardAmount(amount: string | null | undefined) {
if (amount == null) return <span className="text-muted-text">—</span>;
return <span className="font-mono">{formatMonetaryValue(amount)}</span>;
return <span className="numeric">{formatMonetaryValue(amount)}</span>;
}

export const BlockInformation: React.FC<BlockInformationProps> = ({
Expand Down Expand Up @@ -83,7 +83,7 @@ export const BlockInformation: React.FC<BlockInformationProps> = ({
key: 'height',
render: (value) =>
value != null ? (
<span className="font-mono text-flare">
<span className="numeric text-flare">
{formatBlockHeight(value as number)}
</span>
) : (
Expand Down Expand Up @@ -133,9 +133,7 @@ export const BlockInformation: React.FC<BlockInformationProps> = ({
{
label: 'Transactions',
key: 'extrinsicsCount',
render: (value) => (
<span className="font-mono">{value as number}</span>
)
render: (value) => <span className="numeric">{value as number}</span>
}
]}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/features/block-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const BlockDetails: React.FC<Props> = ({ id }) => {
return (
<SectionContainer>
<ContentContainer className="flex flex-col gap-6">
<h1 className="page-title">{title}</h1>
<h1 className="page-title numeric">{title}</h1>

<BlockInformation query={query} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const BlocksStats: React.FC<BlocksStatsProps> = () => {
</CardHeader>
<CardContent>
{success && (
<p className="font-mono !text-flare">
<p className="!text-flare">
#{data?.chain.block_height.toLocaleString()}
</p>
)}
Expand All @@ -49,9 +49,7 @@ export const BlocksStats: React.FC<BlocksStatsProps> = () => {
</CardHeader>
<CardContent>
{success && (
<p className="font-mono">
#{data?.chain.finalized_block_height.toLocaleString()}
</p>
<p>#{data?.chain.finalized_block_height.toLocaleString()}</p>
)}
{loading && <Skeleton className="h-6" />}
{error && <InlineFetchError error={error} />}
Expand All @@ -66,9 +64,7 @@ export const BlocksStats: React.FC<BlocksStatsProps> = () => {
</CardHeader>
<CardContent>
{success && (
<p className="font-mono">
{data?.minedIn24Hours.aggregate.totalCount.toLocaleString()}
</p>
<p>{data?.minedIn24Hours.aggregate.totalCount.toLocaleString()}</p>
)}
{loading && <Skeleton className="h-6" />}
{error && <InlineFetchError error={error} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const CancelledReversibleTransactionInformation: React.FC<
text={formatBlockHeight(value.height)}
href={`${RESOURCES.blocks}/${value.height}`}
className="break-all"
numeric
/>
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const ErrorEventInformation: React.FC<ErrorEventInformationProps> = ({
<LinkWithCopy
text={formatBlockHeight(block.height)}
href={`${RESOURCES.blocks}/${block.height}`}
numeric
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ export const ErrorEventsStats: React.FC<ErrorEventsStatsProps> = () => {
</CardHeader>
<CardContent>
{success && (
<p className="font-mono">
{data?.allTime.total_error_events.toLocaleString()}
</p>
<p>{data?.allTime.total_error_events.toLocaleString()}</p>
)}
{loading && <Skeleton className="h-6" />}
{error && <InlineFetchError error={error} />}
Expand All @@ -59,9 +57,7 @@ export const ErrorEventsStats: React.FC<ErrorEventsStatsProps> = () => {
</CardHeader>
<CardContent>
{success && (
<p className="font-mono">
{data?.last24Hour.aggregate.totalCount.toLocaleString()}
</p>
<p>{data?.last24Hour.aggregate.totalCount.toLocaleString()}</p>
)}
{loading && <Skeleton className="h-6" />}
{error && <InlineFetchError error={error} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const ExecutedReversibleTransactionInformation: React.FC<
text={formatBlockHeight(value.height)}
href={`${RESOURCES.blocks}/${value.height}`}
className="break-all"
numeric
/>
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const HighSecuritySetInformation: React.FC<
<LinkWithCopy
text={formatBlockHeight(block.height)}
href={`${RESOURCES.blocks}/${block.height}`}
numeric
/>
);
}
Expand Down
Loading
Loading