Skip to content

Commit

Permalink
chore: show maintenance info (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Aug 9, 2023
1 parent a868212 commit e96e185
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { dayjs, parseSimpleDateNoSecond } from '../../utils/date'
import SimpleButton from '../SimpleButton'
import { ComponentActions } from '../../contexts/actions'
import { AppCachedKeys } from '../../constants/cache'
import { IS_MAINTAINING } from '../../constants/common'
import styles from './styles.module.scss'
import { isMainnet } from '../../utils/chain'

const FIFTEEN_MINUTES = 15 * 60 * 1000

Expand Down Expand Up @@ -52,7 +52,7 @@ const Alert = () => {
)
}

if (!isMainnet()) {
if (IS_MAINTAINING) {
return <div className={styles.container}>{i18n.t('error.maintain')}</div>
}

Expand Down
1 change: 1 addition & 0 deletions src/constants/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const EPOCH_HOURS = 4
export const ONE_DAY_SECOND = 24 * 60 * 60
export const ONE_HOUR_SECOND = 60 * 60
export const ONE_MINUTE_SECOND = 60
export const IS_MAINTAINING = process.env.REACT_APP_IS_MAINTAINING === 'true'

export function getPrimaryColor() {
return isMainnet() ? '#00CC9B' : '#9A2CEC'
Expand Down

0 comments on commit e96e185

Please sign in to comment.