diff --git a/wallet-web/pages/_app.tsx b/wallet-web/pages/_app.tsx index c7064abf06..f4fd63eab4 100644 --- a/wallet-web/pages/_app.tsx +++ b/wallet-web/pages/_app.tsx @@ -1,49 +1,72 @@ -import React, { useState } from 'react'; -import Head from 'next/head'; -import { ThemeProvider } from '@material-ui/core/styles'; -import CssBaseline from '@material-ui/core/CssBaseline'; -import { theme } from '../lib/theme'; -import type { AppProps } from 'next/app'; -import { ValidatorClientContext } from "../contexts/ValidatorClient"; +import React, { useState } from 'react' +import { Alert, AlertTitle } from '@material-ui/lab' +import Head from 'next/head' +import { ThemeProvider } from '@material-ui/core/styles' +import CssBaseline from '@material-ui/core/CssBaseline' +import { theme } from '../lib/theme' +import type { AppProps } from 'next/app' +import { ValidatorClientContext } from '../contexts/ValidatorClient' +import { Close } from '@material-ui/icons' +import { IconButton } from '@material-ui/core' // TODO: should it perhaps be pulled from some config or also user provided? -export const BONDING_CONTRACT_ADDRESS: string = "punk10pyejy66429refv3g35g2t7am0was7yalwrzen"; +export const BONDING_CONTRACT_ADDRESS: string = + 'punk10pyejy66429refv3g35g2t7am0was7yalwrzen' export const VALIDATOR_URLS: string[] = [ - "https://testnet-milhon-validator1.nymtech.net", - "https://testnet-milhon-validator2.nymtech.net", -]; -export const ADDRESS_LENGTH: number = 43; -export const ADMIN_ADDRESS: string = "punk1h3w4nj7kny5dfyjw2le4vm74z03v9vd4dstpu0" -export const DENOM: string = "punk"; // used everywhere else -export const KEY_LENGTH: number = 32; -export const UDENOM: string = "upunk"; // required for client and coin construction - + 'https://testnet-milhon-validator1.nymtech.net', + 'https://testnet-milhon-validator2.nymtech.net', +] +export const ADDRESS_LENGTH: number = 43 +export const ADMIN_ADDRESS: string = + 'punk1h3w4nj7kny5dfyjw2le4vm74z03v9vd4dstpu0' +export const DENOM: string = 'punk' // used everywhere else +export const KEY_LENGTH: number = 32 +export const UDENOM: string = 'upunk' // required for client and coin construction export default function Application(props: AppProps) { - const { Component, pageProps } = props; + const { Component, pageProps } = props - const [client, setClient] = useState(null) + const [client, setClient] = useState(null) + const [showAlert, setShowAlert] = useState(true) - React.useEffect(() => { - const jssStyles = document.querySelector('#jss-server-side'); - if (jssStyles) { - jssStyles.parentElement.removeChild(jssStyles); - } - }, []); + React.useEffect(() => { + const jssStyles = document.querySelector('#jss-server-side') + if (jssStyles) { + jssStyles.parentElement.removeChild(jssStyles) + } + }, []) - return ( - - - - - Nym - - - - - - - - - ); + return ( + + + + + Nym + + + + + {showAlert && ( + setShowAlert(false)}> + + + } + > + Network maintenance + Testnet Milhon is currently down for maintenance. You may find + that certain features in the wallet do not work during this + period. + + )} + + + + + ) }