mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
added CrashWrapper
This commit is contained in:
parent
26d7e1bc03
commit
dfcd9829e8
@ -1,23 +1,34 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import { Result, Button } from "antd"
|
import { Result, Button } from "antd"
|
||||||
|
|
||||||
export default (props) => {
|
import "./index.less"
|
||||||
|
|
||||||
|
export const CrashComponent = (props) => {
|
||||||
const { crash } = props
|
const { crash } = props
|
||||||
|
|
||||||
return <div className="app_crash_wrapper">
|
return <Result
|
||||||
<Result
|
status="error"
|
||||||
status="error"
|
title="Crash"
|
||||||
title="Crash"
|
subTitle={crash.message}
|
||||||
subTitle={crash.message}
|
extra={[
|
||||||
extra={[
|
<Button type="primary" key="reload" onClick={() => window.location.reload()}>
|
||||||
<Button type="primary" key="reload" onClick={() => window.location.reload()}>
|
Reload app
|
||||||
Reload app
|
</Button>
|
||||||
</Button>
|
]}
|
||||||
]}
|
>
|
||||||
>
|
<div>
|
||||||
<div>
|
<code>{crash.error}</code>
|
||||||
<code>{crash.error}</code>
|
</div>
|
||||||
</div>
|
</Result>
|
||||||
</Result>
|
}
|
||||||
|
|
||||||
|
export const CrashWrapper = (props) => {
|
||||||
|
const { crash } = props
|
||||||
|
|
||||||
|
return <div className="crashWrapper">
|
||||||
|
<CrashComponent crash={crash} />
|
||||||
</div>
|
</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 DraggableDrawer } from "./DraggableDrawer"
|
||||||
export { default as AddableSelectList } from "./AddableSelectList"
|
export { default as AddableSelectList } from "./AddableSelectList"
|
||||||
export { default as SwipeItem } from "./SwipeItem"
|
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 SearchButton } from "./SearchButton"
|
||||||
export { default as UserRegister } from "./UserRegister"
|
export { default as UserRegister } from "./UserRegister"
|
||||||
export { default as Skeleton } from "./Skeleton"
|
export { default as Skeleton } from "./Skeleton"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user