-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/components/RPC.tsx
Outdated
{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> | ||
))} |
There was a problem hiding this comment.
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)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These Number()
are necessary?
There was a problem hiding this comment.
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
closes ZKS-187