Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: chain number format #39

Merged
merged 2 commits into from
Aug 21, 2024
Merged

feat: chain number format #39

merged 2 commits into from
Aug 21, 2024

Conversation

0xtiti
Copy link
Collaborator

@0xtiti 0xtiti commented Aug 21, 2024

closes ZKS-187

Copy link

linear bot commented Aug 21, 2024

Copy link

vercel bot commented Aug 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
z-kchain-hub-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2024 5:44pm

Comment on lines 39 to 53
{rpcIsLoading
? Array.from({ length: 4 }).map((_, index) => (
<RPCBox key={index}>
<Skeleton variant='circular' width={20} height={20} />
<Skeleton variant='text' width='100%' />
</RPCBox>
))
: rpcData.map((rpc, index) => (
<RPCBox key={index}>
<Tooltip title={rpc.status ? t('CHAIN.RPC.statusActive') : t('CHAIN.RPC.statusInactive')}>
{rpc.status ? <CheckIcon color='success' /> : <CancelIcon color='error' />}
</Tooltip>
<RPCUrl>{rpc.url}</RPCUrl>
</RPCBox>
))}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend using the binary operator

@@ -54,7 +54,7 @@ export const ChainInformation = () => {

<ChainInfoCard
title={t('CHAIN.CHAININFORMATION.totalBatchesCommitted')}
description={getDescription(chainData?.batchesInfo?.commited)}
description={getDescription(Number(chainData?.batchesInfo?.commited), notAvailable)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These Number() are necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backend is providing a string type for batchesInfo

@0xtiti 0xtiti merged commit eb26811 into dev Aug 21, 2024
6 checks passed
@0xtiti 0xtiti deleted the feat/format-numbers branch August 21, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants