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

View File

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