status/src/components/Network/index.tsx

33 lines
723 B
TypeScript
Raw Normal View History

2019-12-07 23:02:18 +01:00
import React from 'react'
import styles from './index.module.css'
2019-12-12 20:48:00 +01:00
import Status from './Status'
2019-12-07 23:02:18 +01:00
export interface NetworkProps {
name: string
project?: string
networkId: string
chainId?: string
type: string
rpcUrl?: string
explorerUrl?: string
}
export default function Network({ network }: { network: NetworkProps }) {
return (
<div className={styles.network}>
<header className={styles.networkHeader}>
<h2 className={styles.title}>
{network.name}
<code>{network.networkId}</code>
<span>{network.type}</span>
</h2>
<p>
<code>{network.rpcUrl}</code>
</p>
</header>
2019-12-12 20:48:00 +01:00
<Status network={network} />
2019-12-07 23:02:18 +01:00
</div>
)
}