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:
Luke De Feo
2023-06-19 05:06:52 -07:00
committed by Facebook GitHub Bot
parent f9bbc967ea
commit ae5dd80d67
4 changed files with 30 additions and 21 deletions

View File

@@ -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} />
);
}