Allow user to reset ui debugger after fatal error
Summary: Previously there was no way to get of this state Reviewed By: aigoncharov Differential Revision: D46803900 fbshipit-source-id: 2eb0eb41b58064659ef1d2cff245a2b8d7e2f261
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f9bbc967ea
commit
ae5dd80d67
@@ -7,30 +7,19 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {Button, Result} from 'antd';
|
||||
import {Result} from 'antd';
|
||||
import * as React from 'react';
|
||||
|
||||
export function StreamInterceptorErrorView({
|
||||
retryCallback,
|
||||
button,
|
||||
title,
|
||||
message,
|
||||
}: {
|
||||
title: string;
|
||||
message: string;
|
||||
retryCallback?: () => void;
|
||||
button: React.ReactNode;
|
||||
}): React.ReactElement {
|
||||
return (
|
||||
<Result
|
||||
status="error"
|
||||
title={title}
|
||||
subTitle={message}
|
||||
extra={
|
||||
retryCallback && (
|
||||
<Button onClick={retryCallback} type="primary">
|
||||
Retry
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
/>
|
||||
<Result status="error" title={title} subTitle={message} extra={button} />
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user