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