mirror of
https://github.com/oceanprotocol/status-frontend.git
synced 2024-11-22 01:46:56 +01:00
update state
This commit is contained in:
parent
d9a10f288c
commit
e7c986aad9
@ -2,9 +2,9 @@ import { BigNumber } from 'ethers'
|
|||||||
|
|
||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
export enum State {
|
export enum State {
|
||||||
Up = 'UP',
|
Normal = 'Normal',
|
||||||
Down = 'DOWN',
|
Degraded = 'Degraded',
|
||||||
Warning = 'WARNING'
|
Outage = 'Outage'
|
||||||
}
|
}
|
||||||
/* eslint-enable no-unused-vars */
|
/* eslint-enable no-unused-vars */
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@ import { statusApiUri } from '../../app.config'
|
|||||||
import relativeDate from 'tiny-relative-date'
|
import relativeDate from 'tiny-relative-date'
|
||||||
|
|
||||||
function statusIcon(state: State): ReactElement {
|
function statusIcon(state: State): ReactElement {
|
||||||
if (state === State.Up) {
|
if (state === State.Normal) {
|
||||||
return <CheckAsset className={`${styles.icon} ${styles.check}`} />
|
return <CheckAsset className={`${styles.icon} ${styles.check}`} />
|
||||||
} else if (state === State.Down) {
|
} else if (state === State.Outage) {
|
||||||
return <span className={styles.icon}>🚨</span>
|
return <span className={styles.icon}>🚨</span>
|
||||||
} else {
|
} else {
|
||||||
return <span className={styles.icon}>🚧</span>
|
return <span className={styles.icon}>🚧</span>
|
||||||
@ -21,9 +21,9 @@ function statusIcon(state: State): ReactElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function statusStyle(state: State) {
|
function statusStyle(state: State) {
|
||||||
if (state === State.Down) {
|
if (state === State.Outage) {
|
||||||
return styles.down
|
return styles.down
|
||||||
} else if (state === State.Warning) {
|
} else if (state === State.Degraded) {
|
||||||
return styles.warning
|
return styles.warning
|
||||||
} else {
|
} else {
|
||||||
return styles.up
|
return styles.up
|
||||||
|
Loading…
Reference in New Issue
Block a user