mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
added CrashWrapper
This commit is contained in:
parent
26d7e1bc03
commit
dfcd9829e8
@ -1,23 +1,34 @@
|
||||
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
|
||||
status="error"
|
||||
title="Crash"
|
||||
subTitle={crash.message}
|
||||
extra={[
|
||||
<Button type="primary" key="reload" onClick={() => window.location.reload()}>
|
||||
Reload app
|
||||
</Button>
|
||||
]}
|
||||
>
|
||||
<div>
|
||||
<code>{crash.error}</code>
|
||||
</div>
|
||||
</Result>
|
||||
return <Result
|
||||
status="error"
|
||||
title="Crash"
|
||||
subTitle={crash.message}
|
||||
extra={[
|
||||
<Button type="primary" key="reload" onClick={() => window.location.reload()}>
|
||||
Reload app
|
||||
</Button>
|
||||
]}
|
||||
>
|
||||
<div>
|
||||
<code>{crash.error}</code>
|
||||
</div>
|
||||
</Result>
|
||||
}
|
||||
|
||||
export const CrashWrapper = (props) => {
|
||||
const { crash } = props
|
||||
|
||||
return <div className="crashWrapper">
|
||||
<CrashComponent crash={crash} />
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default CrashComponent
|
11
packages/app/src/components/Crash/index.less
Normal file
11
packages/app/src/components/Crash/index.less
Normal 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);
|
||||
}
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user