update state

This commit is contained in:
mihaisc 2022-10-20 11:32:03 +03:00
parent d9a10f288c
commit e7c986aad9
2 changed files with 7 additions and 7 deletions

View File

@ -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 */

View File

@ -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