refactor: change ChainIndicator to NetworkIndicator

This commit is contained in:
Derrick Hammer 2023-10-09 02:21:52 -04:00
parent baa4365abb
commit c3400859dc
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 8 additions and 8 deletions

View File

@ -38,9 +38,9 @@ const LumeDashboard = () => {
{networks {networks
.filter((network) => network.type === type) .filter((network) => network.type === type)
.map((network, networkIndex) => ( .map((network, networkIndex) => (
<ChainIndicator <NetworkIndicator
key={`${type}_ChainIndicator_${networkIndex}`} key={`${type}_ChainIndicator_${networkIndex}`}
chain={network} network={network}
/> />
))} ))}
</div> </div>
@ -61,19 +61,19 @@ const chainIndicatorVariant = cva("chainIndicatorVariant", {
}, },
}, },
}); });
const ChainIndicator = ({ chain }: { chain: Network }) => { const NetworkIndicator = ({ network }: { network: Network }) => {
return ( return (
<div key={chain.chainId} className="flex flex-row gap-x-2 items-center "> <div key={network.id} className="flex flex-row gap-x-2 items-center ">
<CircularProgress chain={chain} /> <CircularProgress chain={network} />
<div className="flex flex-col"> <div className="flex flex-col">
<span>{chain.name}</span> <span>{network.name}</span>
<span <span
className={cn([ className={cn([
"text-[12px] -mt-1", "text-[12px] -mt-1",
chainIndicatorVariant({ syncState: chain.syncState }), chainIndicatorVariant({ syncState: network.syncState }),
])} ])}
> >
{SYNCSTATE_TO_TEXT[chain.syncState]} {SYNCSTATE_TO_TEXT[network.syncState]}
</span> </span>
</div> </div>
</div> </div>