|
1 | | -import { headerRoot, myLog } from "@loopring-web/common-resources"; |
| 1 | +import { |
| 2 | + CloseIcon, |
| 3 | + headerRoot, |
| 4 | + hexToRGB, |
| 5 | + myLog, |
| 6 | +} from "@loopring-web/common-resources"; |
2 | 7 |
|
3 | | -import { Toolbar } from "@mui/material"; |
| 8 | +import { Box, IconButton, Toolbar, Typography } from "@mui/material"; |
4 | 9 |
|
5 | 10 | import { useHeader } from "./hook"; |
6 | 11 | import { confirmation, useSystem, useAccount } from "@loopring-web/core"; |
@@ -36,6 +41,7 @@ const Header = withTranslation("common")( |
36 | 41 | const { confirmWrapper } = confirmation.useConfirmation(); |
37 | 42 | const { allowTrade } = useSystem(); |
38 | 43 | const { account } = useAccount(); |
| 44 | + const [view, setView] = React.useState(true); |
39 | 45 | // myLog("headerToolBarData", headerToolBarData); |
40 | 46 | return ( |
41 | 47 | <> |
@@ -86,6 +92,35 @@ const Header = withTranslation("common")( |
86 | 92 | btnTxt={t("labelCookiesAgree")} |
87 | 93 | clickToConfirm={() => confirmWrapper()} |
88 | 94 | /> |
| 95 | + |
| 96 | + <Box |
| 97 | + display={view ? "flex" : "none"} |
| 98 | + alignItems={"center"} |
| 99 | + justifyContent={"center"} |
| 100 | + position={"fixed"} |
| 101 | + top={58} |
| 102 | + right={0} |
| 103 | + left={0} |
| 104 | + sx={{ background: hexToRGB("#FBA95C", "0.8") }} |
| 105 | + width={"100%"} |
| 106 | + > |
| 107 | + <Typography color={"white"} padding={2}> |
| 108 | + We are currently experiencing a DDOS attack. The external services |
| 109 | + are temporarily unstable, while it won't impact the blockchain |
| 110 | + security. Our engineers are working hard to resolve this issue. We |
| 111 | + will keep you updated. As always your assets are safe on Loopring |
| 112 | + </Typography> |
| 113 | + <IconButton |
| 114 | + size={"large"} |
| 115 | + aria-label={t("labelClose")} |
| 116 | + color={"inherit"} |
| 117 | + onClick={(event) => { |
| 118 | + setView(false); |
| 119 | + }} |
| 120 | + > |
| 121 | + <CloseIcon htmlColor={"white"} /> |
| 122 | + </IconButton> |
| 123 | + </Box> |
89 | 124 | </> |
90 | 125 | ); |
91 | 126 | } |
|
0 commit comments