mirror of
https://github.com/oceanprotocol/status-frontend.git
synced 2024-11-21 17:36:58 +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 */
|
||||
export enum State {
|
||||
Up = 'UP',
|
||||
Down = 'DOWN',
|
||||
Warning = 'WARNING'
|
||||
Normal = 'Normal',
|
||||
Degraded = 'Degraded',
|
||||
Outage = 'Outage'
|
||||
}
|
||||
/* eslint-enable no-unused-vars */
|
||||
|
||||
|
@ -11,9 +11,9 @@ import { statusApiUri } from '../../app.config'
|
||||
import relativeDate from 'tiny-relative-date'
|
||||
|
||||
function statusIcon(state: State): ReactElement {
|
||||
if (state === State.Up) {
|
||||
if (state === State.Normal) {
|
||||
return <CheckAsset className={`${styles.icon} ${styles.check}`} />
|
||||
} else if (state === State.Down) {
|
||||
} else if (state === State.Outage) {
|
||||
return <span className={styles.icon}>🚨</span>
|
||||
} else {
|
||||
return <span className={styles.icon}>🚧</span>
|
||||
@ -21,9 +21,9 @@ function statusIcon(state: State): ReactElement {
|
||||
}
|
||||
|
||||
function statusStyle(state: State) {
|
||||
if (state === State.Down) {
|
||||
if (state === State.Outage) {
|
||||
return styles.down
|
||||
} else if (state === State.Warning) {
|
||||
} else if (state === State.Degraded) {
|
||||
return styles.warning
|
||||
} else {
|
||||
return styles.up
|
||||
|
Loading…
Reference in New Issue
Block a user