added CrashWrapper

This commit is contained in:
srgooglo 2022-05-30 16:48:31 +02:00
parent 26d7e1bc03
commit dfcd9829e8
3 changed files with 40 additions and 18 deletions

View File

@ -1,11 +1,12 @@
import React from "react"
import { Result, Button } from "antd"
export default (props) => {
import "./index.less"
export const CrashComponent = (props) => {
const { crash } = props
return <div className="app_crash_wrapper">
<Result
return <Result
status="error"
title="Crash"
subTitle={crash.message}
@ -19,5 +20,15 @@ export default (props) => {
<code>{crash.error}</code>
</div>
</Result>
}
export const CrashWrapper = (props) => {
const { crash } = props
return <div className="crashWrapper">
<CrashComponent crash={crash} />
</div>
}
export default CrashComponent

View File

@ -0,0 +1,11 @@
.crashWrapper {
position: absolute;
width: 100vw;
height: 100vh;
z-index: 10000;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10px);
}

View File

@ -15,7 +15,7 @@ export { default as StepsForm } from "./StepsForm"
export { default as DraggableDrawer } from "./DraggableDrawer"
export { default as AddableSelectList } from "./AddableSelectList"
export { default as SwipeItem } from "./SwipeItem"
export { default as Crash } from "./Crash"
export * as Crash from "./Crash"
export { default as SearchButton } from "./SearchButton"
export { default as UserRegister } from "./UserRegister"
export { default as Skeleton } from "./Skeleton"