From e7c986aad90b2695fddca5851a197bc28c097d10 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Thu, 20 Oct 2022 11:32:03 +0300 Subject: [PATCH] update state --- src/@types/index.ts | 6 +++--- src/pages/index.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/@types/index.ts b/src/@types/index.ts index 75f369c..dfc09f3 100644 --- a/src/@types/index.ts +++ b/src/@types/index.ts @@ -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 */ diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 4b36fbd..1965082 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -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 - } else if (state === State.Down) { + } else if (state === State.Outage) { return 🚨 } else { return 🚧 @@ -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