refactor: change ChainIndicator to NetworkIndicator
This commit is contained in:
parent
baa4365abb
commit
c3400859dc
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue