mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
add status info tooltips
This commit is contained in:
parent
a4178854bb
commit
74b8bc3f13
@ -1,15 +1,25 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styles from './VersionStatus.module.scss'
|
import styles from './VersionStatus.module.scss'
|
||||||
|
|
||||||
|
const statusInfo: { [key: string]: string } = {
|
||||||
|
ok: 'Shows if connection to all component endpoints can be established.',
|
||||||
|
network: 'Shows if all components are on the same network.',
|
||||||
|
contracts: 'Shows if contracts loaded by components are the same version.'
|
||||||
|
}
|
||||||
|
|
||||||
const VersionStatus = ({
|
const VersionStatus = ({
|
||||||
status
|
status
|
||||||
}: {
|
}: {
|
||||||
status: { ok: boolean; contracts: boolean; network: boolean }
|
status: { ok: boolean; network: boolean; contracts: boolean }
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.status}>
|
<div className={styles.status}>
|
||||||
{Object.entries(status).map(([key, value]) => (
|
{Object.entries(status).map(([key, value]) => (
|
||||||
<div className={styles.element} key={key}>
|
<div
|
||||||
|
className={styles.element}
|
||||||
|
key={key}
|
||||||
|
title={statusInfo[key]}
|
||||||
|
>
|
||||||
<span
|
<span
|
||||||
className={
|
className={
|
||||||
value === true
|
value === true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user