Skip to content

Commit fbdead7

Browse files
committed
sync to release
1 parent 6d92269 commit fbdead7

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

packages/webapp/src/layouts/header/index.tsx

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
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";
27

3-
import { Toolbar } from "@mui/material";
8+
import { Box, IconButton, Toolbar, Typography } from "@mui/material";
49

510
import { useHeader } from "./hook";
611
import { confirmation, useSystem, useAccount } from "@loopring-web/core";
@@ -36,6 +41,7 @@ const Header = withTranslation("common")(
3641
const { confirmWrapper } = confirmation.useConfirmation();
3742
const { allowTrade } = useSystem();
3843
const { account } = useAccount();
44+
const [view, setView] = React.useState(true);
3945
// myLog("headerToolBarData", headerToolBarData);
4046
return (
4147
<>
@@ -86,6 +92,35 @@ const Header = withTranslation("common")(
8692
btnTxt={t("labelCookiesAgree")}
8793
clickToConfirm={() => confirmWrapper()}
8894
/>
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>
89124
</>
90125
);
91126
}

packages/webapp/src/routers/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { LoadingPage } from "../pages/LoadingPage";
1212
import { LandPage, WalletPage } from "../pages/LandPage";
1313
import {
1414
ErrorMap,
15+
hexToRGB,
1516
SagaStatus,
1617
setMyLog,
1718
ThemeType,

0 commit comments

Comments
 (0)